/// <summary> /// Modify the configuration of the window cache. /// <para /> /// The new configuration is applied immediately. If the new limits are /// smaller than what what is currently cached, older entries will be purged /// as soon as possible to allow the cache to meet the new limit. /// </summary> /// <param name="cfg"> /// The new window cache configuration. /// </param> public static void reconfigure(WindowCacheConfig cfg) { var newCache = new WindowCache(cfg); WindowCache oldCache = _cache; if (oldCache != null) { oldCache.removeAll(); } _cache = newCache; UnpackedObjectCache.Reconfigure(cfg); }
/// <summary> /// Close the resources utilized by this repository. /// </summary> public void Close() { UnpackedObjectCache.purge(this); WindowCache.Purge(this); lock (locker) { _loadedIdx = null; _reverseIdx = null; } #if DEBUG GC.SuppressFinalize(this); // Disarm lock-release checker #endif }
public void saveCache(long position, byte[] data, int type) { UnpackedObjectCache.store(this, position, data, type); }
public UnpackedObjectCache.Entry readCache(long position) { return(UnpackedObjectCache.get(this, position)); }