I wrote a library for this. Big caveat though: it's only for RAM caching. It should NOT be used with distributed apps as each node would not be able to connect to the cache. I wrote it to overcome Memcached's 1 MB limit.
http://procbits.com/2011/01/21/memcached-alternative-for-c-net/