lib/base.js
function (key, val) {
    if (this._cache[key]) {
      return this._cache[key];
    }
    if (typeof val === 'function') {
      val = val.call(this);
    }
    return (this._cache[key] = val);
  }
function (key, val) {
    if (this._cache[key]) {
      return this._cache[key];
    }
    if (typeof val === 'function') {
      val = val.call(this);
    }
    return (this._cache[key] = val);
  }
function ( key , val ) { if ( this . _cache [ key ] ) { return this . _cache [ key ] ; } if ( typeof val === 'function' ) { val = val . call ( this ) ; } return ( this . _cache [ key ] = val ) ; }
Get a value if it exists, otherwise call the given function
and cache the result and return it on subsequent calls.

@param  {String} `key`
@param  {any} `val`
@return {any}
@api public
Get a value if it exists otherwise call the given function and cache the result and return it on subsequent calls .