Call to update the BeanIdCache cache size.
504644
public void setWrapperCacheSize(int cacheSize)
    {
        wrapperCache.setCachePreferredMaxSize(cacheSize);
        int updatedCacheSize = getBeanIdCacheSize(cacheSize);
        beanIdCache.setSize(updatedCacheSize);
    }
965687
private void editCachedServiceInstance(ProvidedServiceInstance instance) {
        try {
            write.lock();
            ServiceInstanceId id = new ServiceInstanceId(instance.getServiceName(),
                    instance.getProviderId());
            CachedProviderServiceInstance cachedInstance = getCacheServiceInstances().get(id);
            if(cachedInstance != null){
                cachedInstance.setMonitorEnabled(instance.isMonitorEnabled());
                cachedInstance.setStatus(instance.getStatus());
            }
            
            LOGGER.debug("update cached ProvidedServiceInstance: {}.", cachedInstance.toString());

        } finally {
            write.unlock();
        }
    }
896503
def _set_cache_(self, attr):
        """"""
        if attr == "size":
            oinfo = self.repo.odb.info(self.binsha)
            self.size = oinfo.size
            # assert oinfo.type == self.type, _assertion_msg_format % (self.binsha, oinfo.type, self.type)
        else:
            super(Object, self)._set_cache_(attr)
1041383
@Override
    public int getCacheSize() {
        CacheConfig commonCacheConfig = ServerCache.getCacheService().getCacheConfig();
        if (commonCacheConfig != null) {
            return commonCacheConfig.cacheSize;
        }
        return 0;
    }
114719
public void resize(int maxSize) {
		this.maxSize = maxSize;
		if (cache.size() > maxSize) {
			int count = 0;
			Iterator<Long> rowIds = cache.keySet().iterator();
			while (rowIds.hasNext()) {
				rowIds.next();
				if (++count > maxSize) {
					rowIds.remove();
				}
			}
		}
	}
843306
def update_hash_prefix_cache(self):
        """"""
        try:
            self.storage.cleanup_full_hashes()
            self.storage.commit()
            self._sync_threat_lists()
            self.storage.commit()
            self._sync_hash_prefix_cache()
        except Exception:
            self.storage.rollback()
            raise
628196
public void cache(AtlasEntityWithExtInfo entity) {
        if (entity != null && entity.getEntity() != null && entity.getEntity().getGuid() != null) {
            entityCacheV2.put(entity.getEntity().getGuid(), entity);
        }
    }
1354425
public static <T extends BaseEntity> void removeCache(T bean){
		if(CacheHandler.cacheProvider == null)return;
		String key = buildCacheKey(bean.getClass(), bean.getId());
		CacheHandler.cacheProvider.remove(key);
	}
425993
protected void initCaches(int cacheSize) {

        m_offlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
        m_onlineJsps = CmsMemoryMonitor.createLRUCacheMap(cacheSize);
    }
639268
public void updateMemoryInfo() {

		MemoryMXBean meminfo = ManagementFactory.getMemoryMXBean();

		MemoryUsage usage = meminfo.getHeapMemoryUsage();
		long _heapUsed = usage.getUsed();
		updateMaximum(heapUsed, _heapUsed);
		updateMaximum(heapTotal, usage.getMax());

		usage = meminfo.getNonHeapMemoryUsage();
		updateMaximum(nonHeapUsed, usage.getUsed());
		updateMaximum(nonHeapTotal, usage.getMax());

		// Log the memory usage if requested. Check the log level before logging
		// to minimize object creation overheads during preparation of the call
		// parameters.
		if (memoryLogger.isLoggable(Level.INFO)) {
			memoryLogger.log(Level.INFO, "MEM", new Object[] { _heapUsed });
		}
	}
873695
def update_dev_cache(self, device, data):
        """"""
        self.update_cache(
            {
                CONST.DEVICES: {
                    device.device_id: data
                }
            })
323357
def _update(self, request, *args, **kwargs):
        """"""
        partial = kwargs.pop('partial', False)
        # NOTE: The line below was changed.
        instance = self.get_object_with_lock()
        serializer = self.get_serializer(instance, data=request.data, partial=partial)
        serializer.is_valid(raise_exception=True)
        self.perform_update(serializer)

        if getattr(instance, '_prefetched_objects_cache', None):
            # If 'prefetch_related' has been applied to a queryset, we need to
            # forcibly invalidate the prefetch cache on the instance.
            instance._prefetched_objects_cache = {}  # pylint: disable=protected-access

        return Response(serializer.data)
575044
private void update(Collision collision,
                        double x,
                        double y,
                        int width,
                        int height,
                        Map<Collision, Rectangle> cacheRectRender)
    {
        if (boxs.containsKey(collision))
        {
            final Rectangle rectangle = boxs.get(collision);
            rectangle.set(x, y, width, height);
            cacheRectRender.get(collision).set(x, y, width, height);
        }
        else
        {
            final Rectangle rectangle = new Rectangle(x, y, width, height);
            cacheColls.add(collision);
            cacheRect.add(rectangle);
            cacheRectRender.put(collision, new Rectangle(x, y, width, height));
            boxs.put(collision, rectangle);
        }
    }
295784
def refresh_cache(self, if_want_update=False):
        """"""
        for thread in tuple(self._thread_cache.values()):
            if if_want_update:
                if not thread.want_update:
                    continue
            thread.update()
323791
public static void resetCaches(int size) {
        nodesCache = new LinkedHashMap<String, List<Node>>() {
            @Override
            protected boolean removeEldestEntry(Map.Entry<String, List<Node>> foo) {
                return size() == size;
            }
        };

        vmsCache = new LinkedHashMap<String, List<VM>>() {
            @Override
            protected boolean removeEldestEntry(Map.Entry<String, List<VM>> foo) {
                return size() == size;
            }
        };
    }
682609
void updateHost() {
        try {
            _cachedLocalHostName.set(_wrappedHostResolver.getLocalHostName());
        } catch (final UnknownHostException e) {
            LOGGER.warn("Unable to resolve host", e);
        }
    }
1087825
@Override
    public int size(boolean includeDiskCache) {
        int mappings = 0;

        mappings = cache.getNumberCacheEntries();

        if (includeDiskCache) {
            if (cache instanceof CacheProviderWrapper) {
                CacheProviderWrapper cpw = (CacheProviderWrapper) cache;
                if (cpw.featureSupport.isDiskCacheSupported())
                    mappings = mappings + cache.getIdsSizeDisk();
            } else {
                mappings = mappings + cache.getIdsSizeDisk();
            }
        }
        return mappings;
    }