|
NAMEMojo::Cache - Naive in-memory cacheSYNOPSISuse Mojo::Cache; my $cache = Mojo::Cache->new(max_keys => 50); $cache->set(foo => 'bar'); my $foo = $cache->get('foo'); DESCRIPTIONMojo::Cache is a naive in-memory cache with size limits.ATTRIBUTESMojo::Cache implements the following attributes.max_keysmy $max = $cache->max_keys; $cache = $cache->max_keys(50); Maximum number of cache keys, defaults to 100. Setting the value to 0 will disable caching. METHODSMojo::Cache inherits all methods from Mojo::Base and implements the following new ones.getmy $value = $cache->get('foo'); Get cached value. set$cache = $cache->set(foo => 'bar'); Set cached value. SEE ALSOMojolicious, Mojolicious::Guides, <https://mojolicious.org>.
Visit the GSP FreeBSD Man Page Interface. |