private static void Serialize(SerializableCache cache) { using (var file = File.Open(Path, FileMode.OpenOrCreate)) { var bf = new BinaryFormatter(); if (cache == null) { cache = new SerializableCache(CacheVersion); } bf.Serialize(file, cache); } }
public CacheManager() { _used = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase); _cache = Deserialize(); _cacheCache = _cache; }