public void Should_Clear_Cache_And_Give_New_Key()
        {
            var cachedKey  = GetKeyForCurrentUser(MyTestCacheName);
            var cachedKey2 = GetKeyForCurrentUser(MyTestCacheName);

            cachedKey2.ShouldBe(cachedKey);

            _cachedUniqueKeyPerUser.ClearCache(MyTestCacheName);

            var cachedKey3 = GetKeyForCurrentUser(MyTestCacheName);

            cachedKey3.ShouldNotBe(cachedKey);
            var cachedKey4 = GetKeyForCurrentUser(MyTestCacheName);

            cachedKey4.ShouldBe(cachedKey3);
        }
Exemplo n.º 2
0
 public void HandleEvent(EntityChangedEventData <SettingInfo> eventData)
 {
     _cachedUniqueKeyPerUser.ClearCache(CacheName);
 }
Exemplo n.º 3
0
 public void HandleEvent(EntityChangedEventData <OrganizationUnitRole> eventData)
 {
     _cachedUniqueKeyPerUser.ClearCache(CacheName);
 }