Exemplo n.º 1
0
        static BaseStorageSettings()
        {
            Cache = new KafkaCache <ConsumerCacheItem>();
            Cache.Subscribe((i) =>
            {
                var settings = StorageSettings.Load();
                if (i.Name == settings.Module)
                {
                    settings.Clear();
                }

                var cdnSettings = CdnStorageSettings.Load();
                if (i.Name == cdnSettings.Module)
                {
                    cdnSettings.Clear();
                }
            }, CacheNotifyAction.Remove);
        }
Exemplo n.º 2
0
        static BaseStorageSettings()
        {
            AscCache.Notify.Subscribe <Consumer>((i, a) =>
            {
                if (a == CacheNotifyAction.Remove)
                {
                    var settings = StorageSettings.Load();
                    if (i.Name == settings.Module)
                    {
                        settings.Clear();
                    }

                    var cdnSettings = CdnStorageSettings.Load();
                    if (i.Name == cdnSettings.Module)
                    {
                        cdnSettings.Clear();
                    }
                }
            });
        }
Exemplo n.º 3
0
        static BaseStorageSettings()
        {
            AscCache.Notify.Subscribe <ConsumerCacheItem>((i, a) =>
            {
                if (a == CacheNotifyAction.Remove)
                {
                    CoreContext.TenantManager.SetCurrentTenant(i.TenantId);

                    var settings = StorageSettings.Load();
                    if (i.Name == settings.Module)
                    {
                        settings.Clear();
                    }

                    var cdnSettings = CdnStorageSettings.Load();
                    if (i.Name == cdnSettings.Module)
                    {
                        cdnSettings.Clear();
                    }
                }
            });
        }