C# Class NContext.Extensions.Redis.RedisCache

Inheritance: ObjectCache, IRedisCache
Datei anzeigen Open project: PowerDMS/NContext

Public Methods

Method Description
AddOrGetExisting ( System.Runtime.Caching.CacheItem value, System.Runtime.Caching.CacheItemPolicy policy ) : System.Runtime.Caching.CacheItem
AddOrGetExisting ( String key, Object value, System.Runtime.Caching.CacheItemPolicy policy, String regionName = null ) : Object
AddOrGetExisting ( String key, Object value, DateTimeOffset absoluteExpiration, String regionName = null ) : Object
Contains ( String key, String regionName = null ) : System.Boolean
CreateCacheEntryChangeMonitor ( IEnumerable keys, String regionName = null ) : System.Runtime.Caching.CacheEntryChangeMonitor
Get ( String key, String regionName = null ) : Object
GetCacheItem ( String key, String regionName = null ) : System.Runtime.Caching.CacheItem
GetCount ( String regionName = null ) : System.Int64

This property is not supported and will always throw an exception. When overridden in a derived class, gets the total number of cache entries in the cache.

GetValues ( IEnumerable keys, String regionName = null ) : Object>.IDictionary
RedisCache ( Func redisClusterConfigurationOptionsFactory, ISerializer serializer = null ) : System
Remove ( String key, String regionName = null ) : Object
Set ( System.Runtime.Caching.CacheItem item, System.Runtime.Caching.CacheItemPolicy policy ) : void
Set ( String key, Object value, System.Runtime.Caching.CacheItemPolicy policy, String regionName = null ) : void
Set ( String key, Object value, DateTimeOffset absoluteExpiration, String regionName = null ) : void
this ( String key ) : Object

Protected Methods

Method Description
GetEnumerator ( ) : Object>>.IEnumerator

Private Methods

Method Description
AddOrGetExistingInternal ( String key, Object value, System.Runtime.Caching.CacheItemPolicy policy ) : Object
ConfigureSlidingExpiration ( String key, System.Runtime.Caching.CacheItemPolicy policy ) : void
GetPolicyExpiration ( System.Runtime.Caching.CacheItemPolicy policy ) : TimeSpan?
GetValue ( String key ) : Object
SetInternal ( String key, Object value, System.Runtime.Caching.CacheItemPolicy policy, When condition = When.Always ) : System.Boolean
SetValue ( String key, Object value, System.TimeSpan expiration = null, When condition = When.Always ) : System.Boolean

Method Details

AddOrGetExisting() public method

public AddOrGetExisting ( System.Runtime.Caching.CacheItem value, System.Runtime.Caching.CacheItemPolicy policy ) : System.Runtime.Caching.CacheItem
value System.Runtime.Caching.CacheItem
policy System.Runtime.Caching.CacheItemPolicy
return System.Runtime.Caching.CacheItem

AddOrGetExisting() public method

public AddOrGetExisting ( String key, Object value, System.Runtime.Caching.CacheItemPolicy policy, String regionName = null ) : Object
key String
value Object
policy System.Runtime.Caching.CacheItemPolicy
regionName String
return Object

AddOrGetExisting() public method

public AddOrGetExisting ( String key, Object value, DateTimeOffset absoluteExpiration, String regionName = null ) : Object
key String
value Object
absoluteExpiration DateTimeOffset
regionName String
return Object

Contains() public method

public Contains ( String key, String regionName = null ) : System.Boolean
key String
regionName String
return System.Boolean

CreateCacheEntryChangeMonitor() public method

public CreateCacheEntryChangeMonitor ( IEnumerable keys, String regionName = null ) : System.Runtime.Caching.CacheEntryChangeMonitor
keys IEnumerable
regionName String
return System.Runtime.Caching.CacheEntryChangeMonitor

Get() public method

public Get ( String key, String regionName = null ) : Object
key String
regionName String
return Object

GetCacheItem() public method

public GetCacheItem ( String key, String regionName = null ) : System.Runtime.Caching.CacheItem
key String
regionName String
return System.Runtime.Caching.CacheItem

GetCount() public method

This property is not supported and will always throw an exception. When overridden in a derived class, gets the total number of cache entries in the cache.
public GetCount ( String regionName = null ) : System.Int64
regionName String Optional. A named region in the cache for which the cache entry count should be computed, if regions are implemented. The default value for the optional parameter is null.
return System.Int64

GetEnumerator() protected method

protected GetEnumerator ( ) : Object>>.IEnumerator
return Object>>.IEnumerator

GetValues() public method

public GetValues ( IEnumerable keys, String regionName = null ) : Object>.IDictionary
keys IEnumerable
regionName String
return Object>.IDictionary

RedisCache() public method

public RedisCache ( Func redisClusterConfigurationOptionsFactory, ISerializer serializer = null ) : System
redisClusterConfigurationOptionsFactory Func
serializer ISerializer
return System

Remove() public method

public Remove ( String key, String regionName = null ) : Object
key String
regionName String
return Object

Set() public method

public Set ( System.Runtime.Caching.CacheItem item, System.Runtime.Caching.CacheItemPolicy policy ) : void
item System.Runtime.Caching.CacheItem
policy System.Runtime.Caching.CacheItemPolicy
return void

Set() public method

public Set ( String key, Object value, System.Runtime.Caching.CacheItemPolicy policy, String regionName = null ) : void
key String
value Object
policy System.Runtime.Caching.CacheItemPolicy
regionName String
return void

Set() public method

public Set ( String key, Object value, DateTimeOffset absoluteExpiration, String regionName = null ) : void
key String
value Object
absoluteExpiration DateTimeOffset
regionName String
return void

this() public method

public this ( String key ) : Object
key String
return Object