memcached client for the d programming language
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Memcached client for the D programming language.

memcached is a distributed caching system (

The basic idea is this: if you need to share/cache objects between applications you dump them into memcache in a serialized form. the data can be read back from other programs - even from other programming language - provided that the reader knows how to deserialize the data. a common way to serialize data is json. Memcached4d uses vibe serialization library to dump your data to json, but you can provide your own serialization method by implementing a JSON toJson method in your objects.

A similar tool - with a lot more features is Redis - you may have a look at vibe.db.redis


	auto cache = memcachedConnect("");
	auto cache = memcachedConnect("");
	auto cache = memcachedConnect( ["", ""] ); // you can connect the the same server multiplie times 
	auto cache = memcachedConnect( "," ); 
	auto cache = memcachedConnect( "," ); 

   if("str_var", "lorem ipsum") == RETURN_STATE.SUCCESS ) {
		writeln("stored successfully");
		writeln( " get back the stored data : {", cache.get!string("str_var") , "}" );
   }else {
   		writeln("not stored");