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);
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.
takes an cache daemon object and store internally.
If you want to change some settings of the stored cached, use this.
If the requested URL is stored in the cache, just returns it. Otherwise, tries to lengthen it, and stores it if appropriate.
Kenichi Ishigaki, <firstname.lastname@example.org>
Copyright (C) 2007 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.