cache this one to speed things up a bit
499894
def cigar_array(self):
     """"""
     if self._cigar: return self._cigar
     self._cigar = [CIGARDatum(int(m[0]),m[1]) for m in re.findall('([0-9]+)([MIDNSHP=X]+)',self.entries.cigar)]
     return self._cigar
939457
def update_cache(self, data):
        """"""
        UTILS.update(self._cache, data)
        self._save_cache()
123095
function memoize( f ) {
   const cache = {};
   return key => {
      let value = cache[ key ];
      if( value === undefined ) {
         value = f( key );
         cache[ key ] = value;
      }
      return value;
   };
}
740849
public function cache()
    {
        $this->cache->put(
            $this->getCacheKey(),
            $this->toJson(),
            $this->getCacheLifetime()
        );
    }
1142045
def increment(self, key, value=1):
        
        return self._memcache.incr(self._prefix + key, value)
421060
def visit_this_2(receiver, thing, arg1, arg2)
    if method_name = @cache[thing.class]
      return receiver.send(method_name, thing, arg1, arg2)
    end
    visit_this(receiver, thing, [arg1, arg2])
  end
1168755
def visit_this_1(receiver, thing, arg)
    if method_name = @cache[thing.class]
      return receiver.send(method_name, thing, arg)
    end
    visit_this(receiver, thing, [arg])
  end
344939
def _fill_cache(self):
        """"""
        for irow in range(len(self._table)):
            job_details = self.make_job_details(irow)
            self._cache[job_details.fullkey] = job_details
41793
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);
        });
      });
    }
830168
function Prefetch(o) {
  this.url = o.url;
  this.ttl = o.ttl;
  this.cache = o.cache;
  this.prepare = o.prepare;
  this.transform = o.transform;
  this.transport = o.transport;
  this.thumbprint = o.thumbprint;

  this.storage = new PersistentStorage(o.cacheKey);
}
908360
function shouldCache(options) {
    options = options || {};
    return (options.hasOwnProperty('cache') && !options.cache) || !self.options.cache;
  }
352030
def resolve(self, *pargs, **kwargs):
        """"""
        self._cached = (pargs, kwargs)
        self._try_then()
353927
def save_cache(data, filename):
    """"""
    with open(filename, 'wb') as handle:
        pickle.dump(data, handle)
488372
def memoize(func):
    """"""
    cache = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        """Caching wrapper."""
        key = (args, tuple(sorted(kwargs.items())))
        if key in cache:
            return cache[key]
        else:
            result = func(*args, **kwargs)
            cache[key] = result
            return result

    return wrapper
1330269
def _cache(cpath, arg):
        '''
        
        '''
        if not os.path.isdir(cpath): os.makedirs(cpath)
        for (k,v) in six.iteritems(arg):
            save(os.path.join(cpath, k + '.pp'), v, create_directories=True, overwrite=True)
        return True
300601
function Cache(ttl, dir) {
    // This cache will live forever if ttl is null
  if (typeof ttl !== 'number') {
    ttl = null;
  }
  this.ttl = ttl;
  this.dir = dir;
}
1358777
protected void putToCache(String cacheName, String key, Object value, long ttlSeconds) {
        if (cacheItemsExpireAfterWrite) {
            putToCache(cacheName, key, value, ttlSeconds, 0);
        } else {
            putToCache(cacheName, key, value, 0, ttlSeconds);
        }
    }