RedisNamespace
manages a "region" in the redis key space namespace can be cleared by incrementing the generation
Assembly: ServiceStack.Redis.dll
View Source
Declaration
public class RedisNamespace
Properties
LockingStrategy
get locking strategy
View Source
Declaration
public ILockingStrategy LockingStrategy { get; set; }
Fields
KeyTag
View Source
Declaration
public const string KeyTag = "%?%"
NamespaceTag
View Source
Declaration
public const string NamespaceTag = "!?!"
NamespacesGarbageKey
View Source
Declaration
public const string NamespacesGarbageKey = "@?@REDIS_NAMESPACES_GARBAGE"
NumTagsForKey
View Source
Declaration
public const int NumTagsForKey = 0
NumTagsForLockKey
View Source
Declaration
public const int NumTagsForLockKey = 1
Methods
GetGeneration()
get current generation
View Source
Declaration
public long GetGeneration()
Returns
System.Int64
SetGeneration(Int64)
set new generation
View Source
Declaration
public void SetGeneration(long generation)
Parameters
Type | Name |
---|---|
System.Int64 | generation |
GetGenerationKey()
redis key for generation
View Source
Declaration
public string GetGenerationKey()
Returns
System.String
GetGlobalKeysKey()
get redis key that holds all namespace keys
View Source
Declaration
public string GetGlobalKeysKey()
Returns
System.String
GlobalCacheKey(Object)
get global cache key
View Source
Declaration
public string GlobalCacheKey(object key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | key |
GlobalLockKey(Object)
View Source
Declaration
public string GlobalLockKey(object key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | key |
GlobalKey(Object, Int32)
get global key inside of this namespace
View Source
Declaration
public string GlobalKey(object key, int numUniquePrefixes)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.Object | key |
|
| System.Int32
| numUniquePrefixes | prefixes can be added for name deconfliction
|