GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CHI::DRIVER::FASTMMAP (3)

.ds Aq ’

NAME

CHI::Driver::FastMmap - Persistent interprocess cache via mmap’ed files

CONTENTS

VERSION

version 0.58

SYNOPSIS



    use CHI;

    my $cache = CHI->new(
        driver     => FastMmap,
        root_dir   => /path/to/cache/root,
        cache_size => 1m
    );



DESCRIPTION

This cache driver uses Cache::FastMmap to store data in an mmap’ed file. It is very fast, and can be used to share data between processes on a single host, though not between hosts.

To support namespaces, this driver takes a directory parameter rather than a file, and creates one Cache::FastMMap file for each namespace.

Because CHI handles serialization automatically, we pass the raw_values flag as 1; and to conform to the CHI API, we pass unlink_on_exit as 0, so that all cache files are permanent.

REQUIREMENTS

You will need to install Cache::FastMmap from CPAN to use this driver.

CONSTRUCTOR OPTIONS

root_dir Path to the directory that will contain the share files, one per namespace. Defaults to a directory called ’chi-driver-fastmmap’ under the OS default temp directory (e.g. ’/tmp’ on UNIX).
dir_create_mode Permissions mode to use when creating directories. Defaults to 0775.
Any other constructor options not recognized by CHI are passed along to Cache::FastMmap->new.

METHODS

fm_cache Returns a handle to the underlying Cache::FastMmap object. You can use this to call FastMmap-specific methods that are not supported by the general API, e.g.



    $self->fm_cache->get_and_set("key", sub { ... });



SEE ALSO

CHI

AUTHOR

Jonathan Swartz <swartz@pobox.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CHI::DRIVER::FASTMMAP (3) 2013-07-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.