public static void InvalidateStemCache(string smlouvaId) { var key = new KeyAndId() { ValueForData = smlouvaId, CacheNameOnDisk = $"stem_smlouva_{smlouvaId}" }; Util.Consts.Logger.Debug("Deleting stems cache for " + smlouvaId); stemCacheManager.Delete(key); }
public static string GetRawStems(Smlouva s, bool rewriteStems = false) { if (s == null) { return(null); } var key = new KeyAndId() { ValueForData = s.Id, CacheNameOnDisk = $"stem_smlouva_{s.Id}" }; if (rewriteStems) { stemCacheManager.Delete(key); } var data = stemCacheManager.Get(key); if (data == null) { return(null); } return(System.Text.Encoding.UTF8.GetString(data)); }