private static void SetToDB(string key, string value) { DynamicStorageService svc = new DynamicStorageService(); DynamicStorageCache cache = new DynamicStorageCache(); svc.SetToDB(key, value); cache.ClearCacheEntry(key); }
private static string GetFromDB(string key) { DynamicStorageService svc = new DynamicStorageService(); DynamicStorageCache cache = new DynamicStorageCache(); var value = cache.GetValue(key, svc.GetFromDB); if (value != null) { return(value.ToString()); } else { return(null); } }