Pinwheel::Cache
use Pinwheel::Cache qw(cache cache_get cache_set); Pinwheel::Cache::set_backend(new Pinwheel::Cache::Hash); cache_set('key', 'value'); $value = cache_get('get'); cache('key', sub { 'result of complex operation' });
Procedural caching API.
Remove all objects from the cache.
Returns the data associated with *$key*.
Associates *$data* with *$key* in the cache. *$expires_in* indicates the time in seconds until this data should be erased.
Delete the data associated with the *$key* from the cache.
Call subroutine and store the result in the cache with *$key*. If there is already data in the cache associated with *$key* then it is returned and the subroutine is not called.
Set the caching backend to use. The backend should implement the Cache::Cache API.
A&M Network Publishing <DLAMNetPub@bbc.co.uk>
To install Pinwheel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pinwheel
CPAN shell
perl -MCPAN -e shell install Pinwheel
For more information on module installation, please visit the detailed CPAN module installation guide.