CHI::Driver::Memory man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

CHI::Driver::Memory(3)User Contributed Perl DocumentatioCHI::Driver::Memory(3)

NAME
       CHI::Driver::Memory - In-process memory based cache

VERSION
       version 0.55

SYNOPSIS
	   use CHI;

	   my $hash = {};
	   my $cache = CHI->new( driver => 'Memory', datastore => $hash );

	   my $cache = CHI->new( driver => 'Memory', global => 1 );

DESCRIPTION
       This cache driver stores data on a per-process basis.  This is the
       fastest of the cache implementations, but data can not be shared
       between processes.  Data will remain in the cache until cleared,
       expired, or the process dies.

       To maintain the same semantics as other caches, references to data
       structures are deep-copied on set and get. Thus, modifications to the
       original data structure will not affect the data structure stored in
       the cache, and vica versa. See CHI::Driver::RawMemory for a faster
       memory cache that sacrifices this behavior.

CONSTRUCTOR OPTIONS
       When using this driver, the following options can be passed to
       CHI->new() in addition to the CHI. One of datastore or global must be
       specified, or else a warning (possibly an error eventually) will be
       thrown.

       datastore [HASHREF]
	   A reference to a hash to be used for storage. Within the hash, each
	   namespace is used as a key to a second-level hash.  This hash may
	   be passed to multiple CHI::Driver::Memory constructors.

       global [BOOL]
	   Use a standard global datastore. Multiple caches created with this
	   flag will see the same data. Before 0.21, this was the default
	   behavior; now it must be specified explicitly (to avoid
	   accidentally sharing the same datastore in unrelated code).

DISCARD POLICY
       For CHI/SIZE AWARENESS caches, this driver implements an 'LRU' policy,
       which discards the least recently used items first. This is the default
       policy.

SEE ALSO
       CHI::Driver::RawMemory, CHI

AUTHOR
       Jonathan Swartz <swartz@pobox.com>

COPYRIGHT AND LICENSE
       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.

perl v5.14.2			  2012-07-04		CHI::Driver::Memory(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net