My favorites | Sign in
Project Logo
             
Search
for
Updated Apr 29, 2008 by skrolle
Labels: Phase-Implementation
Embed  
How to embed the BeIT Memcached client in your project.

Getting the code

Simply download the source archive from the project home, or check out the files from svn from the project source page. Either way, you will get a complete Visual Studio 2005 solution which contains the client and some example code that shows how it's used.

Embedding the code into your project

You have multiple options for embedding the client in your code.

Using the code in your project

The only class you need to access is the BeIT.MemCached.MemcachedClient class. Start by calling the static Setup method with a name and a list of memcached servers that the client should use. Then call the GetInstance method to get this instance of the client. On that object you can then call the various methods such as Set and Get to use the cache.

It is also possible to set up a client using the standard app.config file.

Check the Examples page for more detailed usage info, and check the code itself for a complete list of all methods and their overloads.


Comment by jordanclark, Apr 17, 2009

Is it possible to embed this client library into SQL Server 2005/2008 as an SQL CLR function?

What I'm thinking is it would make a lot of sense if I could add a trigger directly onto tables so that when data is directly modified in the database it could send requests to the memcached servers to flush certain keys.

Our database can be modified with adhoc queries, so if I could use this I'd be able to trust the data still in cache is fresh, even possibly having no expiration set.


Sign in to add a comment
Hosted by Google Code