public void ReloadCache() { var factory = new ServerRegistrationFactory(); var all = Database.Fetch <ServerRegistrationDto>("WHERE id > 0") .Select(x => factory.BuildEntity(x)) .Cast <IServerRegistration>() .ToArray(); _globalCache.ClearCacheItem(CacheKey); _globalCache.GetCacheItem(CacheKey, () => all); }