When using memcache we bumped into some problems. The major one was that we needed to invalidate data due to some content that was updated. For this we took a fresh look at memcache, and made our own derivative, depcached. Short for Dependency Cache.
It is available for all to download and use. Version 1.0.1 and newer now also supports simple queues. Will document it a bit better soon...
Please note that the PHP extension was missing in the 1.0.1 release. You can download the 1.0.2 release when you want to use it.
In the depcached tar we also included the code for the php client. Just use phpize, configure and make install to install the client. Don't forget to adapt your php.ini to load it as an extension.
We also provide the Anymeta_Cache.php source code.
Depcached is very similar to memcache. Though at the moment depcached only supports a subset of the command set of memcache.
We support:
Queues are simple fifo queues with a fixed size. With the queue command you can add something to a queue. The get command will return you the complete queue. The dequeue command will send the oldest item in the queue and will afterwards remove it from the queue.
With every queue command you can change the length of the queue.
At the moment there is no option to get the number of items in a queue.
<?php
$depcached = depcached_connect('localhost', 31307);
if ($depcached)
{
$depcached->set("str_key", "String to store in depcached");
$depcached->set("num_key", 123);
$object = new StdClass;
$object->attribute = 'test';
$depcached->set("obj_key", $object);
$array = Array('assoc'=>123, 345, 567);
$depcached->set("arr_key", $array);
echo '<pre>';
var_dump($depcached->get('str_key'));
var_dump($depcached->get('num_key'));
var_dump($depcached->get('obj_key'));
var_dump($depcached->get('arr_key'));
$depcached->set("a/b/c", "Some value for a/b/c", 0, 0, "x y");
var_dump($depcached->get('a/b/c'));
$depcached->flush("x");
var_dump($depcached->get('a/b/c'));
$depcached->set('x', 'hello world');
$depcached->delete('x');
}
else
{
echo "Connection to depcached failed";
}
?>
There is a new and better version of this memcached clone. Please check ou...
A PHP library for OAuth consumers and servers. Complete with an extensible OAuth store, includi...
Here is the full implementation of OAuth for anyMeta. For now we...
Verso Wiki is a Wiki to HTML and HTML to Wiki markup translator. We use this W...
I just published a new version of our OAuth server and consumer code. The major addition to thi...
All Internet applications have to secure their inner workings against attacks from outside. We a...
Thrift is a software framework for scalable cross-language services development. It combines a po...
I just tagged anyMeta 3.2.3. It is a small version number change that incorporates big changes u...
More and more people collect a growing mountain of digital photos. I try to manage that nice mo...
eZ Publish is an open source content management system (CMS) and an open source content managemen...
I just published a new version of our OAuth server and consumer code. The major addition to thi...
Thrift is a software framework for scalable cross-language services development. It combines a po...
More and more people collect a growing mountain of digital photos. I try to manage that nice mo...
eZ Publish is an open source content management system (CMS) and an open source content managemen...
A PHP library for OAuth consumers and servers. Complete with an extensible OAuth store, includi...
Here is the full implementation of OAuth for anyMeta. For now we...
I just published a new version of our OAuth server and consumer code. The major addition to thi...
I just published a new version of our OAuth server and consumer code. The major addition to thi...
I just tagged anyMeta 3.2.3. It is a small version number change that incorporates big changes u...