lib/middleware/ai.js
function getCache() {
      return new Promise(function(resolve, reject) {
        // create and fetch the cache key
        get(getKey(), function(err, data) {
          if (err) {
            return reject(err);
          }
          resolve(data);
        });
      });
    }
function getCache() {
      return new Promise(function(resolve, reject) {
        // create and fetch the cache key
        get(getKey(), function(err, data) {
          if (err) {
            return reject(err);
          }
          resolve(data);
        });
      });
    }
function getCache ( ) { return new Promise ( function ( resolve , reject ) { // create and fetch the cache key get ( getKey ( ) , function ( err , data ) { if ( err ) { return reject ( err ) ; } resolve ( data ) ; } ) ; } ) ; }
Fetches an image buffer from the cache

@returns {Promise}
Fetches an image buffer from the cache