C# Class BB.Caching.Cache.Shared.Keys

Generic commands that apply to all/most data structures
http://redis.io/commands#generic
Show file Open project: JesseBuesking/BB.Caching

Public Methods

Method Description
DebugObject ( string key ) : RedisValue

Returns the raw DEBUG OBJECT output for a key; this command is not fully documented and should be avoided unless you have good reason, and then avoided anyway.

http://redis.io/commands/debug-object

DebugObjectAsync ( string key ) : Task

Returns the raw DEBUG OBJECT output for a key; this command is not fully documented and should be avoided unless you have good reason, and then avoided anyway.

http://redis.io/commands/debug-object

Delete ( RedisKey key ) : bool

Removes the specified key. A key is ignored if it does not exist.

http://redis.io/commands/del

Delete ( RedisKey keys ) : long

Removes the specified keys. A key is ignored if it does not exist.

http://redis.io/commands/del

DeleteAsync ( RedisKey key ) : Task

Removes the specified key. A key is ignored if it does not exist.

http://redis.io/commands/del

DeleteAsync ( RedisKey keys ) : Task

Removes the specified keys. A key is ignored if it does not exist.

http://redis.io/commands/del

Exists ( string key ) : bool

Returns if key exists.

http://redis.io/commands/exists

ExistsAsync ( string key ) : Task

Returns if key exists.

http://redis.io/commands/exists

Expire ( string key, System.TimeSpan expiry ) : bool

Set a timeout on key. After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology.

If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information.http://redis.io/commands/expire

ExpireAsync ( string key, System.TimeSpan expiry ) : Task

Set a timeout on key. After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology.

If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information.http://redis.io/commands/expire

GetLength ( ) : long

Return the number of keys in the currently selected database.

http://redis.io/commands/dbsize

Persist ( string key ) : bool

Remove the existing timeout on key.

Available with 2.1.2 and above onlyhttp://redis.io/commands/persist

PersistAsync ( string key ) : Task

Remove the existing timeout on key.

Available with 2.1.2 and above onlyhttp://redis.io/commands/persist

Random ( ) : RedisKey

Return a random key from the currently selected database.

http://redis.io/commands/randomkey

RandomAsync ( ) : Task

Return a random key from the currently selected database.

http://redis.io/commands/randomkey

TimeToLive ( string key ) : TimeSpan?

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.

http://redis.io/commands/ttl

TimeToLiveAsync ( string key ) : Task

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.

http://redis.io/commands/ttl

Type ( string key ) : RedisType

Returns the string representation of the type of the value stored at key. The different types that can be returned are: string, list, set, zset and hash.

http://redis.io/commands/type

TypeAsync ( string key ) : Task

Returns the string representation of the type of the value stored at key. The different types that can be returned are: string, list, set, zset and hash.

http://redis.io/commands/type

Method Details

DebugObject() public static method

Returns the raw DEBUG OBJECT output for a key; this command is not fully documented and should be avoided unless you have good reason, and then avoided anyway.
http://redis.io/commands/debug-object
public static DebugObject ( string key ) : RedisValue
key string /// The key. ///
return RedisValue

DebugObjectAsync() public static method

Returns the raw DEBUG OBJECT output for a key; this command is not fully documented and should be avoided unless you have good reason, and then avoided anyway.
http://redis.io/commands/debug-object
public static DebugObjectAsync ( string key ) : Task
key string /// The key. ///
return Task

Delete() public static method

Removes the specified key. A key is ignored if it does not exist.
http://redis.io/commands/del
public static Delete ( RedisKey key ) : bool
key RedisKey /// The key. ///
return bool

Delete() public static method

Removes the specified keys. A key is ignored if it does not exist.
http://redis.io/commands/del
public static Delete ( RedisKey keys ) : long
keys RedisKey /// The keys. ///
return long

DeleteAsync() public static method

Removes the specified key. A key is ignored if it does not exist.
http://redis.io/commands/del
public static DeleteAsync ( RedisKey key ) : Task
key RedisKey /// The key. ///
return Task

DeleteAsync() public static method

Removes the specified keys. A key is ignored if it does not exist.
http://redis.io/commands/del
public static DeleteAsync ( RedisKey keys ) : Task
keys RedisKey /// The keys. ///
return Task

Exists() public static method

Returns if key exists.
http://redis.io/commands/exists
public static Exists ( string key ) : bool
key string /// The key. ///
return bool

ExistsAsync() public static method

Returns if key exists.
http://redis.io/commands/exists
public static ExistsAsync ( string key ) : Task
key string /// The key. ///
return Task

Expire() public static method

Set a timeout on key. After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology.
If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information. http://redis.io/commands/expire
public static Expire ( string key, System.TimeSpan expiry ) : bool
key string /// The key. ///
expiry System.TimeSpan /// The expiry. ///
return bool

ExpireAsync() public static method

Set a timeout on key. After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology.
If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information. http://redis.io/commands/expire
public static ExpireAsync ( string key, System.TimeSpan expiry ) : Task
key string /// The key. ///
expiry System.TimeSpan /// The expiry. ///
return Task

GetLength() public static method

Return the number of keys in the currently selected database.
http://redis.io/commands/dbsize
public static GetLength ( ) : long
return long

Persist() public static method

Remove the existing timeout on key.
Available with 2.1.2 and above only http://redis.io/commands/persist
public static Persist ( string key ) : bool
key string /// The key. ///
return bool

PersistAsync() public static method

Remove the existing timeout on key.
Available with 2.1.2 and above only http://redis.io/commands/persist
public static PersistAsync ( string key ) : Task
key string /// The key. ///
return Task

Random() public static method

Return a random key from the currently selected database.
http://redis.io/commands/randomkey
public static Random ( ) : RedisKey
return RedisKey

RandomAsync() public static method

Return a random key from the currently selected database.
http://redis.io/commands/randomkey
public static RandomAsync ( ) : Task
return Task

TimeToLive() public static method

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.
http://redis.io/commands/ttl
public static TimeToLive ( string key ) : TimeSpan?
key string /// The key. ///
return TimeSpan?

TimeToLiveAsync() public static method

Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset.
http://redis.io/commands/ttl
public static TimeToLiveAsync ( string key ) : Task
key string /// The key. ///
return Task

Type() public static method

Returns the string representation of the type of the value stored at key. The different types that can be returned are: string, list, set, zset and hash.
http://redis.io/commands/type
public static Type ( string key ) : RedisType
key string /// The key. ///
return RedisType

TypeAsync() public static method

Returns the string representation of the type of the value stored at key. The different types that can be returned are: string, list, set, zset and hash.
http://redis.io/commands/type
public static TypeAsync ( string key ) : Task
key string /// The key. ///
return Task