simple-lru.js
function (key) {
      var entry = this._byKey.del(key);
      if (!entry) return;

      delete this._byOrder[entry.index];
      this._len--;

      if (this._len === 0) {
        this._head = this._tail = 0;
      } else {
        // update most index if it was most lecently used entry
        if (entry.index === this._head - 1) this._pop();
        // update least index if it was least lecently used entry
        if (entry.index === this._tail) this._shift();
      }

      return entry.val;
    }
function (key) {
      var entry = this._byKey.del(key);
      if (!entry) return;

      delete this._byOrder[entry.index];
      this._len--;

      if (this._len === 0) {
        this._head = this._tail = 0;
      } else {
        // update most index if it was most lecently used entry
        if (entry.index === this._head - 1) this._pop();
        // update least index if it was least lecently used entry
        if (entry.index === this._tail) this._shift();
      }

      return entry.val;
    }
function ( key ) { var entry = this . _byKey . del ( key ) ; if ( ! entry ) return ; delete this . _byOrder [ entry . index ] ; this . _len -- ; if ( this . _len === 0 ) { this . _head = this . _tail = 0 ; } else { // update most index if it was most lecently used entry if ( entry . index === this . _head - 1 ) this . _pop ( ) ; // update least index if it was least lecently used entry if ( entry . index === this . _tail ) this . _shift ( ) ; } return entry . val ; }
delete cache by key

@param {String}
@return {String|Object|Number} cached value
delete cache by key