No description, website, or topics provided.
Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/MogileFS/Client
t
xt
.gitignore
.shipit
Changes
MANIFEST.SKIP
Makefile.PL
README

README

NAME
    MogileFS::Client::WithCache -

SYNOPSIS
      use MogileFS::Client::WithCache;
      use Cache::Memcached::Fast;
      my $cache = Cache::Memcached::Fast->new(
        servers => ['10.0.0.1:11211'],
        namespace => 'my_namespace',
      );
      my $mogilefs = MogileFS::Client::WithCache->new(
        domain  => 'foo.com::my_namespace',
        hosts   => ['10.0.0.2:7001', '10.0.0.3:7001'],
        cache   => $cache,
        namespace => 'my_namespace_mogile',
        cache_expire => 5 * 60, # 5 min.
      );

      # get with cache
      my @paths = $mogilefs->get_paths('some_key'); 

      # update and clear cache.
      $mogilefs->store_content('some_key', 'some_class', 'content');

      # get_paths without caching.
      my @paths2 = $mogilefs->get_paths_without_cache('some_key');

DESCRIPTION
    MogileFS::Client::WithCache is for caching get_paths's call
    automatically.

    I know memcached backend for MogileFS, but I want to cache by
    application layer.

    Don't cache too long for rebalance or move files. It's limit of
    application layer caching.

AUTHOR
    Keiji Yoshimi <walf443@gmail.com>

SEE ALSO
LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.