internal static IEnumerable <string> Get(string key) { if (!_cache.IsActual) { lock (_sync) { if (!_cache.IsActual) { _cache = new FileCache(); } } } if (!_cache.Files.ContainsKey(key)) { throw new ApplicationException($"An object with key {key} does not exists"); } return(_cache.Files[key]); }
static FileCacheStore() { _cache = new FileCache(); _sync = new object(); }