lib/processor.js
function (context, next) {
        this._cache.read(context.cached._id, function (err, doc) {
            if (err || !doc)
                return next(err || new Error('Critical failure! A cache entry has mysteriously disappeared...'));
            context.cached = doc;
            // this should happen only for internal phantom errors, not client javascript errors.
            if (context.cached.error) {
                this.logger.warn('The last try gave us an error, try to recompute.', { error: context.cached.error });
                context.options.force = true;
                context.options.wait = true;
            }
            next(null);
        });
    }
function (context, next) {
        this._cache.read(context.cached._id, function (err, doc) {
            if (err || !doc)
                return next(err || new Error('Critical failure! A cache entry has mysteriously disappeared...'));
            context.cached = doc;
            // this should happen only for internal phantom errors, not client javascript errors.
            if (context.cached.error) {
                this.logger.warn('The last try gave us an error, try to recompute.', { error: context.cached.error });
                context.options.force = true;
                context.options.wait = true;
            }
            next(null);
        });
    }
function ( context , next ) { this . _cache . read ( context . cached . _id , function ( err , doc ) { if ( err || ! doc ) return next ( err || new Error ( 'Critical failure! A cache entry has mysteriously disappeared...' ) ) ; context . cached = doc ; // this should happen only for internal phantom errors, not client javascript errors. if ( context . cached . error ) { this . logger . warn ( 'The last try gave us an error, try to recompute.' , { error : context . cached . error } ) ; context . options . force = true ; context . options . wait = true ; } next ( null ) ; } ) ; }
Read the cache entry.
It should exists, so if it doesn't, the cache has a critical failure.
@param {object} context
@param {function} next
Read the cache entry . It should exists so if it doesn t the cache has a critical failure .