| CHI documentation | Contained in the CHI distribution. |
CHI::Driver::Null - Nothing is cached
version 0.49
use CHI;
my $cache = CHI->new(driver => 'Null');
$cache->set('key', 5);
my $value = $cache->get('key'); # returns undef
This cache driver implements the full CHI interface without ever actually storing items. Useful for disabling caching in an application, for example.
Jonathan Swartz <swartz@pobox.com>
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| CHI documentation | Contained in the CHI distribution. |
package CHI::Driver::Null; BEGIN { $CHI::Driver::Null::VERSION = '0.49'; } use Moose; use strict; use warnings; extends 'CHI::Driver'; __PACKAGE__->meta->make_immutable(); sub fetch { undef } sub store { undef } sub remove { undef } sub clear { undef } sub get_keys { return () } sub get_namespaces { return () } 1;
__END__