Naoto Ishikawa > MongoDBx-Tiny-0.03 > MongoDBx::Tiny::Plugin::SingleByCache

Download:
MongoDBx-Tiny-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

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.

syntax highlighting: