Пример #1
0
        internal static void ClearCache()
        {
            var tenantId = CoreContext.TenantManager.GetCurrentTenant().TenantId.ToString();
            var path     = TenantPath.CreatePath(tenantId);

            foreach (var module in GetModuleList("", true))
            {
                Cache.Publish(DataStoreCacheItem.Create(path, module), CacheNotifyAction.Remove);
            }
        }
Пример #2
0
 public static void Remove(string tenantId, string module)
 {
     Cache.Remove(DataStoreCacheItem.Create(tenantId, module).MakeCacheKey());
 }
Пример #3
0
 public static IDataStore Get(string tenantId, string module)
 {
     return(Cache.Get <IDataStore>(DataStoreCacheItem.Create(tenantId, module).MakeCacheKey()));
 }
Пример #4
0
 public static void Put(IDataStore store, string tenantId, string module)
 {
     Cache.Insert(DataStoreCacheItem.Create(tenantId, module).MakeCacheKey(), store, DateTime.MaxValue);
 }