MongoDBx::Tiny::Plugin::SingleByCache - find via cache
# -------------------- 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" #
Naoto ISHIKAWA, <toona at seesaa.co.jp>
<toona at seesaa.co.jp>
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.
To install MongoDBx::Tiny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDBx::Tiny
CPAN shell
perl -MCPAN -e shell install MongoDBx::Tiny
For more information on module installation, please visit the detailed CPAN module installation guide.