WWW::Lengthen::Cached - WWW::Lengthen::Cached documentation


WWW-Lengthen documentation  | view source Contained in the WWW-Lengthen distribution.

Index


NAME

Top

WWW::Lengthen::Cached

SYNOPSIS

Top

    use WWW::Lengthen::Cached;
    use Cache::Memcached;
    my $lengthener = WWW::Lengthen::Cached->new;
    my $cached = Cache::Memcached->new(...);
    $lengthener->setup_cached($cached)

    my $lengthened_url = $lengthener->try($url);

DESCRIPTION

Top

You may want to reuse lengthened URLs. With this, you can store them in cache servers. Cache::Memcached and the likes (which have set/get methods) are supported.

METHODS

Top

setup_cached

takes an cache daemon object and store internally.

cache

If you want to change some settings of the stored cached, use this.

try

If the requested URL is stored in the cache, just returns it. Otherwise, tries to lengthen it, and stores it if appropriate.

AUTHOR

Top

Kenichi Ishigaki, <ishigaki@cpan.org>

COPYRIGHT AND LICENSE

Top


WWW-Lengthen documentation  | view source Contained in the WWW-Lengthen distribution.