A caching version of this 'getAccessorFn' was removed as the perf gain is minimal or negative based on simple testing.
516631
function getAccessorFn(bs, propName) {
            return function () {
                if (arguments.length == 0) {
                    return bs[propName];
                } else {
                    bs[propName] = arguments[0];
                }
            };
        }
1321778
public long lastModified(final String filename) {
        LRUCache.CacheEntry<String, T> cacheEntry = cache.get(filename);
        if (cacheEntry == null) {
            return -1;
        }
        return cacheEntry.lastModified;
    }
1359829
public static void removeFromCache(Configuration conf, String filename) throws IOException {
    FileSystem fS = FileSystem.get(conf);
    fS.delete(locateFileInCache(conf, filename), true);
  }
610262
def cache_property(key, empty, type):
    """"""
    return property(lambda x: x._get_cache_value(key, empty, type),
                    lambda x, v: x._set_cache_value(key, v, type),
                    lambda x: x._del_cache_value(key),
                    'accessor for %r' % key)
632564
def no_instance_caching():
    
    # this assumes that no sub-class of Expression shadows
    # Expression.instance_caching
    orig_flag = Expression.instance_caching
    Expression.instance_caching = False
    try:
        yield
    finally:
        Expression.instance_caching = orig_flag
1301494
def clear(self, only_read=False):
        
        self.cache_items.clear()
        self.total_access_count = 0
        self.logger.debug('Cache clear operation is completed')
600458
boolean allocateNormal(PoolArena<?> area, PooledByteBuf<?> buf, int reqCapacity, int normCapacity) {
        return allocate(cacheForNormal(area, normCapacity), buf, reqCapacity);
    }
151658
boolean allocateTiny(PoolArena<?> area, PooledByteBuf<?> buf, int reqCapacity, int normCapacity) {
        return allocate(cacheForTiny(area, normCapacity), buf, reqCapacity);
    }
560465
private void removeEntryFromAuthCache(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) {
        /*
         * TODO: we need to optimize this method... if the authCacheService.remove() method
         * return true for successfully removed the entry in the authentication cache, then we
         * do not have to call the second method for token. See defect 66015
         */
        removeEntryFromAuthCacheForUser(req, res);
        removeEntryFromAuthCacheForToken(req, res, config);
    }
727474
function () {
    const oThis = this
      , clearCacheOfExpr = /(openst-platform\/config\/)|(openst-platform\/lib\/)/
    ;

    Object.keys(require.cache).forEach(function (key) {
      if (key.search(clearCacheOfExpr) !== -1) {
        delete require.cache[key];
      }
    });
    oThis.setContractObj();

    // Read this from a file
    oThis.snmData = JSON.parse(fs.readFileSync(oThis.filePath).toString());

    oThis.checkForFurtherEvents();
  }
1097172
public static PutFromLoadValidator removeFromCache(AdvancedCache cache) {
      AsyncInterceptorChain chain = cache.getAsyncInterceptorChain();
      BasicComponentRegistry cr = cache.getComponentRegistry().getComponent(BasicComponentRegistry.class);

		chain.removeInterceptor(TxPutFromLoadInterceptor.class);
		chain.removeInterceptor(NonTxPutFromLoadInterceptor.class);

      chain.getInterceptors().stream()
            .filter(BaseInvalidationInterceptor.class::isInstance).findFirst().map(AsyncInterceptor::getClass)
            .ifPresent(invalidationClass -> {
               InvalidationInterceptor invalidationInterceptor = new InvalidationInterceptor();
               cr.replaceComponent(InvalidationInterceptor.class.getName(), invalidationInterceptor, true);
               cr.getComponent(InvalidationInterceptor.class).running();
               chain.replaceInterceptor(invalidationInterceptor, invalidationClass);
            });

      chain.getInterceptors().stream()
            .filter(LockingInterceptor.class::isInstance).findFirst().map(AsyncInterceptor::getClass)
            .ifPresent(invalidationClass -> {
               NonTransactionalLockingInterceptor lockingInterceptor = new NonTransactionalLockingInterceptor();
               cr.replaceComponent(NonTransactionalLockingInterceptor.class.getName(), lockingInterceptor, true);
               cr.getComponent(NonTransactionalLockingInterceptor.class).running();
               chain.replaceInterceptor(lockingInterceptor, LockingInterceptor.class);
            });

		CacheCommandInitializer cci = cr.getComponent(CacheCommandInitializer.class).running();
		return cci.removePutFromLoadValidator(cache.getName());
	}
553269
def clear_cache(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.clear_cache(index=self._name, **kwargs)
522628
public static long getVisibilityCacheWeight(FluoConfiguration conf) {
    long size = conf.getLong(VISIBILITY_CACHE_WEIGHT, VISIBILITY_CACHE_WEIGHT_DEFAULT);
    if (size <= 0) {
      throw new IllegalArgumentException(
          "Cache size must be positive for " + VISIBILITY_CACHE_WEIGHT);
    }
    return size;
  }
1291494
def _get_cache(vcf_fn, array_type, region, cachedir, compress, log):
    """"""

    # guard condition
    if isinstance(vcf_fn, (list, tuple)):
        raise Exception(
            'caching only supported when loading from a single VCF file'
        )

    # create cache file name
    cache_fn = _mk_cache_fn(vcf_fn, array_type=array_type, region=region,
                            cachedir=cachedir, compress=compress)

    # decide whether or not a fresh cache file is available
    # (if not, we will parse the VCF and build array from scratch)
    if not os.path.exists(cache_fn):
        log('no cache file found')
        is_cached = False
    elif os.path.getmtime(vcf_fn) > os.path.getmtime(cache_fn):
        is_cached = False
        log('cache file out of date')
    else:
        is_cached = True
        log('cache file available')

    return cache_fn, is_cached
1162888
private String getFileFromCache(String filename) {
        LRUCache.CacheEntry<String, T> cachedTemplate = cache.get(filename);

        if (cachedTemplate == null) {
            return null;
        }

        return cache.get(filename).raw;
    }
1335096
private CachedProviderServiceInstance getCachedServiceInstance(
            String serviceName, String providerAddress) {
        
		ServiceInstanceId id = new ServiceInstanceId(serviceName, providerAddress);
		return getCacheServiceInstances().get(id);
       
    }
732195
def _uncache(self, cpath, node, ureg):
        '''
        
        '''
        # load the results, one at a time; all errors can just be allowed to raise upward since
        # this is always called from in a try block (in __call__)
        result = {}
        for eff in node.efferents:
            result[eff] = load(os.path.join(cpath, eff) + '.pp', ureg=ureg)
        return result