MemcachedClientCache
A memcached implementation of the ServiceStack ICacheClient interface. Good practice not to have dependencies on implementations in your business logic.
Basically delegates all calls to Enyim.Caching.MemcachedClient with added diagnostics and logging.
Assembly: ServiceStack.Caching.Memcached.dll
View Source
Declaration
public class MemcachedClientCache : ICacheClient, IMemcachedClient, IDisposable
Properties
Log
View Source
Declaration
protected ILog Log { get; }
Methods
Dispose()
View Source
Declaration
public void Dispose()
Remove(String)
View Source
Declaration
public bool Remove(string key)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
Get(String)
View Source
Declaration
public object Get(string key)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | key |
Get(String, out UInt64)
View Source
Declaration
public object Get(string key, out ulong ucas)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | key |
System.UInt64 | ucas |
Get<T>(String)
View Source
Declaration
public T Get<T>(string key)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | key |
Type Parameters
T
Increment(String, UInt32)
View Source
Declaration
public long Increment(string key, uint amount)
Returns
System.Int64
Parameters
Type | Name |
---|---|
System.String | key |
System.UInt32 | amount |
Decrement(String, UInt32)
View Source
Declaration
public long Decrement(string key, uint amount)
Returns
System.Int64
Parameters
Type | Name |
---|---|
System.String | key |
System.UInt32 | amount |
Add<T>(String, T)
View Source
Declaration
public bool Add<T>(string key, T value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
Type Parameters
T
Set<T>(String, T)
View Source
Declaration
public bool Set<T>(string key, T value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
Type Parameters
T
Replace<T>(String, T)
View Source
Declaration
public bool Replace<T>(string key, T value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
Type Parameters
T
Add<T>(String, T, DateTime)
View Source
Declaration
public bool Add<T>(string key, T value, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.DateTime | expiresAt |
Type Parameters
T
Set<T>(String, T, DateTime)
View Source
Declaration
public bool Set<T>(string key, T value, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.DateTime | expiresAt |
Type Parameters
T
Replace<T>(String, T, DateTime)
View Source
Declaration
public bool Replace<T>(string key, T value, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.DateTime | expiresAt |
Type Parameters
T
Add<T>(String, T, TimeSpan)
View Source
Declaration
public bool Add<T>(string key, T value, TimeSpan expiresIn)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.TimeSpan | expiresIn |
Type Parameters
T
Set<T>(String, T, TimeSpan)
View Source
Declaration
public bool Set<T>(string key, T value, TimeSpan expiresIn)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.TimeSpan | expiresIn |
Type Parameters
T
Replace<T>(String, T, TimeSpan)
View Source
Declaration
public bool Replace<T>(string key, T value, TimeSpan expiresIn)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.TimeSpan | expiresIn |
Type Parameters
T
Add(String, Object)
View Source
Declaration
public bool Add(string key, object value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
Set(String, Object)
View Source
Declaration
public bool Set(string key, object value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
Replace(String, Object)
View Source
Declaration
public bool Replace(string key, object value)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
Add(String, Object, DateTime)
View Source
Declaration
public bool Add(string key, object value, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
System.DateTime | expiresAt |
Set(String, Object, DateTime)
View Source
Declaration
public bool Set(string key, object value, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
System.DateTime | expiresAt |
Replace(String, Object, DateTime)
View Source
Declaration
public bool Replace(string key, object value, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
System.DateTime | expiresAt |
CheckAndSet(String, Object, UInt64)
View Source
Declaration
public bool CheckAndSet(string key, object value, ulong cas)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
System.UInt64 | cas |
CheckAndSet(String, Object, UInt64, DateTime)
View Source
Declaration
public bool CheckAndSet(string key, object value, ulong cas, DateTime expiresAt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
System.Object | value |
System.UInt64 | cas |
System.DateTime | expiresAt |
FlushAll()
View Source
Declaration
public void FlushAll()
GetAll<T>(IEnumerable<String>)
View Source
Declaration
public IDictionary<string, T> GetAll<T>(IEnumerable<string> keys)
Returns
System.Collections.Generic.IDictionary<System.String,<T>>
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | keys |
Type Parameters
T
SetAll<T>(IDictionary<String, T>)
View Source
Declaration
public void SetAll<T>(IDictionary<string, T> values)
Parameters
Type | Name |
---|---|
System.Collections.Generic.IDictionary<System.String,<T>> | values |
Type Parameters
T
GetAll(IEnumerable<String>)
View Source
Declaration
public IDictionary<string, object> GetAll(IEnumerable<string> keys)
Returns
System.Collections.Generic.IDictionary<System.String,System.Object>
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | keys |
GetAll(IEnumerable<String>, out IDictionary<String, UInt64>)
View Source
Declaration
public IDictionary<string, object> GetAll(IEnumerable<string> keys, out IDictionary<string, ulong> casValues)
Returns
System.Collections.Generic.IDictionary<System.String,System.Object>
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | keys |
System.Collections.Generic.IDictionary<System.String,System.UInt64> | casValues |
RemoveAll(IEnumerable<String>)
View Source
Declaration
public void RemoveAll(IEnumerable<string> keys)
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | keys |
Implements
- ServiceStack.Caching.ICacheClient
- ServiceStack.Caching.IMemcachedClient
System.IDisposable