Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    CHI 0.55

    Download button

    No screenshots available
    Downloads: 410  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.4/5)
    9 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jonathan Swartz | More programs
    Perl Artistic License / FREE
    July 5th, 2012, 12:27 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CHI description

    CHI is an unified cache interface.

    CHI is an unified cache interface.

    SYNOPSIS

    use CHI;

    # Choose a standard driver
    #
    my $cache = CHI->new( driver => 'Memory' );
    my $cache = CHI->new( driver => 'File', cache_root => '/path/to/root' );
    my $cache = CHI->new(
    driver => 'FastMmap',
    root_dir => '/path/to/root',
    cache_size => '1k'
    );
    my $cache = CHI->new(
    driver => 'Memcached',
    servers => [ "10.0.0.15:11211", "10.0.0.15:11212" ]
    );
    my $cache = CHI->new(
    driver => 'Multilevel',
    subcaches => [
    { driver => 'Memory' },
    {
    driver => 'Memcached',
    servers => [ "10.0.0.15:11211", "10.0.0.15:11212" ]
    }
    ],
    );

    # Create your own driver
    #
    my $cache = CHI->new( driver_class => 'My::Special::Driver' );

    # (These drivers coming soon...)
    #
    my $cache = CHI->new( driver => 'DBI', dbh => $dbh, table => 'app_cache' );
    my $cache = CHI->new( driver => 'BerkeleyDB', root_dir => '/path/to/root' );

    # Basic cache operations
    #
    my $customer = $cache->get($name);
    if ( !defined $customer ) {
    $customer = get_customer_from_db($name);
    $cache->set( $name, $customer, "10 minutes" );
    }
    $cache->remove($name);

    CHI provides a unified caching API, designed to assist a developer in persisting data for a specified period of time.

    The CHI interface is implemented by driver classes that support fetching, storing and clearing of data. Driver classes exist or will exist for the gamut of storage backends available to Perl, such as memory, plain files, memory mapped files, memcached, and DBI.

    CHI is intended as an evolution of DeWitt Clinton's Cache::Cache package, adhering to the basic Cache API but adding new features and addressing limitations in the Cache::Cache implementation.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    cache interface | Perl interface | Perl module | cache | Perl | interface

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM