Mindscape LightSpeed - User Reference & API Documentation
MemcachedCache Class
API ReferenceMindscape.LightSpeed.CachingMemcachedCache
A highly scalable, distributed second-level cache ICache implementation using memcached. Configuration of the memcached client should be performed using the underlying memcached client objects. Theses objects are exposed as properties of this class: MemcachedClient and SockIOPool. For example to set the list of memcached servers:
CopyC#
string[] servers = {"1.1.1.0:11211", "1.1.1.1:11211"};

memcachedCache.SockIOPool.SetServers(servers);
memcachedCache.SockIOPool.Initialize();
NB: As shown above, it is required to call the Initialize()()() method after configuration is complete.
Declaration Syntax
C#Visual Basic
public sealed class MemcachedCache : ICache, 
	IDisposable
Public NotInheritable Class MemcachedCache _
	Implements ICache, IDisposable
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
MemcachedCache()()()
AddItem(String, Object, TimeSpan)
Adds an item into the cache, only if it does not already exist.

Dispose()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetItem(String)
Gets an item from the cache.

MemcachedClient
Gets the underlying MemcachedClient

RemoveItem(String)
Removes the specified item from the cache.

SetItem(String, Object, TimeSpan)
Sets an item into the cache overwriting any existing item with the same key.

SockIOPool
Gets the underlying memcached SockIOPool instance.

Inheritance Hierarchy
Object
MemcachedCache

Assembly: Mindscape.LightSpeed (Module: Mindscape.LightSpeed) Version: 1.2.1393.0 (1.2.1393.0)