NAME
MongoDBx::Tiny::Plugin::SingleByCache - find via cache
SYNOPSIS
# --------------------
package Your::Data;
use MongoDBx::Tiny;
# ~ snip ~
LOAD_PLUGIN "SingleByCache";
# --------------------
$object = $tiny->single_by_cache('collection_name',{ query => 'value'});
$object = $tiny->single_by_cache('collection_name',{ query => 'value'},
{ cache => $cache, cache_key => $key });
#
# $cache need to have get, set and delete method.
# you can also set default $cache defining it as "tiny::get_cache"
#
EXPORT
single_by_cache
single_by_cache_key
AUTHOR
Naoto ISHIKAWA, <toona at seesaa.co.jp>
LICENSE AND COPYRIGHT
Copyright 2013 Naoto ISHIKAWA.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.