| Catalyst-Plugin-Cache-Store-FastMmap documentation | Contained in the Catalyst-Plugin-Cache-Store-FastMmap distribution. |
Catalyst::Plugin::Cache::Backend::FastMmap - A thin wrapper for Cache::FastMmap that can handle non refs.
use Catalyst::Plugin::Cache::Backend::FastMmap;
my $cache_obj = Catalyst::Plugin::Cache::Backend::FastMmap->new;
$cache_obj->set( key => [qw/blah blah blah/] );
$cache_obj->set( key => "this_works_too" ); # non references can also be stored
| Catalyst-Plugin-Cache-Store-FastMmap documentation | Contained in the Catalyst-Plugin-Cache-Store-FastMmap distribution. |
#!/usr/bin/perl package Catalyst::Plugin::Cache::Backend::FastMmap; use base qw/Cache::FastMmap/; use strict; use warnings; # wrap everything in a scalar ref so that we can store plain scalars as well sub get { my ( $self, $key ) = @_; ${ $self->SUPER::get($key) || return }; } sub set { my ( $self, $key, $value ) = @_; $self->SUPER::set( $key => \$value ); } __PACKAGE__; __END__