cjmarkham / mongo-cache
A MongoDB Caching service for Silex
dev-master
2014-02-03 14:51 UTC
Requires
This package is not auto-updated.
Last update: 2024-12-31 07:18:46 UTC
README
A mongo cache service for silex
Registering
In composer.json add this to your dependencies
"cjmarkham/mongo-cache": "dev-master"
Then to register
$app->register(new MongoCache\MongoCacheServiceProvider());
Usage
$app->register(new MongoCache\MongoCacheServiceProvider());
$app['mongocache']->collection = $collection;
$app['mongocache']->set($key, $data);
$app['mongocache']->get($key, \Closure $function);
$app['mongocache']->delete($key);
$app['mongocache']->delete_group($group);