This method does not necessarily use a BioCache but it seems to fit here.
164922
def static_get_pdb_object(pdb_id, bio_cache = None, cache_dir = None):
        ''''''
        pdb_id = pdb_id.upper()

        if bio_cache:
            return bio_cache.get_pdb_object(pdb_id)

        if cache_dir:
            # Check to see whether we have a cached copy of the PDB file
            filepath = os.path.join(cache_dir, '{0}.pdb'.format(pdb_id))
            if os.path.exists(filepath):
                return PDB.from_filepath(filepath)

        # Get any missing files from the RCSB and create cached copies if appropriate
        pdb_contents = retrieve_pdb(pdb_id)
        if cache_dir:
            write_file(os.path.join(cache_dir, "%s.pdb" % pdb_id), pdb_contents)
        return PDB(pdb_contents)
645111
function addDeps(a, b) {
  if (a && a.cache && b) {
    if (b.cache) {
      a.cache.mergeDeps(b.cache);
    }
    a.cache.addDeps(b.realpath || b);
  }
}
653288
public <K, V> AdvancedCache<K, V> decorateCache(AdvancedCache<K, V> cache) {
      return cache.transform(this::transform);
   }
228862
function _use_zcache_p(yes_no){
	if( yes_no == true ){
	    use_zcache_p = true;
	}else if( yes_no == false ){
	    use_zcache_p = false;
	}
	return use_zcache_p;
    }
401030
@Nonnull
	public <V extends T> LToByteFunctionBuilder<T> aCase(Class<V> argC, LToByteFunction<V> function) {
		PartialCaseWithByteProduct.The pc = partialCaseFactoryMethod(a -> (argC == null || argC.isInstance(a)));

		pc.evaluate(function);
		return self();
	}
868051
static <K, V> SerializationProxy<K, V> makeSerializationProxy(
      BoundedLocalCache<?, ?> cache, boolean isWeighted) {
    SerializationProxy<K, V> proxy = new SerializationProxy<>();
    proxy.weakKeys = cache.collectKeys();
    proxy.weakValues = cache.nodeFactory.weakValues();
    proxy.softValues = cache.nodeFactory.softValues();
    proxy.isRecordingStats = cache.isRecordingStats();
    proxy.removalListener = cache.removalListener();
    proxy.ticker = cache.expirationTicker();
    proxy.writer = cache.writer;
    if (cache.expiresAfterAccess()) {
      proxy.expiresAfterAccessNanos = cache.expiresAfterAccessNanos();
    }
    if (cache.expiresAfterWrite()) {
      proxy.expiresAfterWriteNanos = cache.expiresAfterWriteNanos();
    }
    if (cache.expiresVariable()) {
      proxy.expiry = cache.expiry();
    }
    if (cache.evicts()) {
      if (isWeighted) {
        proxy.weigher = cache.weigher;
        proxy.maximumWeight = cache.maximum();
      } else {
        proxy.maximumSize = cache.maximum();
      }
    }
    return proxy;
  }
880039
@Override
	public IGenericCache putIfAbsent(String key, IGenericCache cache) {
		return _namedCaches.putIfAbsent(key, cache);
	}
901015
function(fn) {
    // Cleans all cache files
    var self = this;

    fs.readdir(this.dir, function(err, files) {
      if (err) {
        return fn(err);
      }

      var methods = files.map(function(file) {
        return function(_fn) {
          fs.unlink(path.join(self.dir, file), function(err) {
            _fn(err);
          });
        };
      });

      async.parallel(methods, function(err) {
        fn(err);
      });
    });
  }
918139
def main():  # suppress(unused-function)
    """"""
    description = ("""Pre-populate cache for polysquare-generic-file-linter and spellcheck-linter.""")
    parser = argparse.ArgumentParser(description=description)
    parser.add_argument("cache_path",
                        metavar=("PATH"),
                        help="""PATH to cache""",
                        type=str)
    parser.add_argument("--technical-terms",
                        metavar=("FILE"),
                        help="""FILE containing technical terms""",
                        type=str)
    arguments = parser.parse_args(sys.argv[1:])
    valid_words_dictionary.create(arguments.cache_path)
    technical_words_dictionary.create(arguments.technical_terms,
                                      arguments.cache_path)
    return 0
700922
public static void putMethodSigsCache(String serviceName, String methodName, String[] argSigs) {
        ConcurrentHashMap<String, String[]> cacheSigs = NOT_OVERLOAD_METHOD_SIGS_CACHE.get(serviceName);
        if (cacheSigs == null) {
            cacheSigs = new ConcurrentHashMap<String, String[]>();
            ConcurrentHashMap<String, String[]> old = NOT_OVERLOAD_METHOD_SIGS_CACHE
                .putIfAbsent(serviceName, cacheSigs);
            if (old != null) {
                cacheSigs = old;
            }
        }
        cacheSigs.putIfAbsent(methodName, argSigs);
    }
670088
private static PersistenceStrategy<?, ?, ?> getPerKindStrategy(EmbeddedCacheManager externalCacheManager, URL configUrl, JtaPlatform platform) {
		OnePerKindKeyProvider keyProvider = new OnePerKindKeyProvider();

		OnePerKindCacheManager cacheManager = externalCacheManager != null ?
				new OnePerKindCacheManager( externalCacheManager ) :
				new OnePerKindCacheManager( configUrl, platform, keyProvider );

		return new PersistenceStrategy<EntityKey, AssociationKey, IdSourceKey>( cacheManager, keyProvider );
	}
721316
public static <K, V> Cache<K, V> unwrapCache(Cache<K, V> cache) {
      if (cache instanceof AbstractDelegatingCache) {
         return unwrapCache(((AbstractDelegatingCache<K, V>) cache).getDelegate());
      }
      return cache;
   }
722175
private static Model excise(Set<BioPAXElement> result)
	{
		Completer c = new Completer(EM);
		result = c.complete(result);
		Cloner cln = new Cloner(EM, BioPAXLevel.L3.getDefaultFactory());
		return cln.clone(result);
	}
942982
function bootstrapAPI (cache) {
  cache.set = set.bind(null, cache)
  cache.get = get.bind(null, cache)
  cache.del = del.bind(null, cache)
  return cache
}
694782
function (data) {
    var cache = this.cache;
    var cacheCount = this.cacheCount;
    var geometry;
    var hash;

    if (data.skipCache) { return; }

    hash = this.hash(data);

    if (!cache[hash]) { return; }

    decrementCacheCount(cacheCount, hash);

    // Another entity is still using this geometry. No need to do anything.
    if (cacheCount[hash] > 0) { return; }

    // No more entities are using this geometry. Dispose.
    geometry = cache[hash];
    geometry.dispose();
    delete cache[hash];
    delete cacheCount[hash];
  }
815303
def method_cache(by='value',method='run'):
    """"""

    def decorate_(func):
        def decorate(*args, **kwargs):
            model = args[0] # Assumed to be self.
            assert hasattr(model,method), "Model must have a '%s' method."%method
            if func.__name__ == method: # Run itself.
                method_args = kwargs
            else: # Any other method.
                method_args = kwargs[method] if method in kwargs else {}
            if not hasattr(model.__class__,'cached_runs'): # If there is no run cache.
                model.__class__.cached_runs = {} # Create the method cache.
            cache = model.__class__.cached_runs
            if by == 'value':
                model_dict = {key:value for key,value in list(model.__dict__.items()) \
                              if key[0]!='_'}
                method_signature = SciUnit.dict_hash({'attrs':model_dict,'args':method_args}) # Hash key.
            elif by == 'instance':
                method_signature = SciUnit.dict_hash({'id':id(model),'args':method_args}) # Hash key.
            else:
                raise ValueError("Cache type must be 'value' or 'instance'")
            if method_signature not in cache:
                print("Method with this signature not found in the cache. Running...")
                f = getattr(model,method)
                f(**method_args)
                cache[method_signature] = (datetime.now(),model.__dict__.copy())
            else:
                print("Method with this signature found in the cache. Restoring...")
                _,attrs = cache[method_signature]
                model.__dict__.update(attrs)
            return func(*args, **kwargs)
        return decorate
    return decorate_
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