NAME

CHI::Driver::BerkeleyDB - BerkeleyDB Cache Driver for CHI

VERSION

version 0.05

SYNOPSIS

 use CHI;

 my $cache = CHI->new(
     driver     => 'BerkeleyDB',
     root_dir   => '/path/to/cache/root'
 );

DESCRIPTION

This cache driver uses Berkeley DB files to store data. Each namespace is stored in its own db file.

By default, the driver configures the Berkeley DB environment to use the Concurrent Data Store (CDS), making it safe for multiple processes to read and write the cache without explicit locking.

CONSTRUCTOR OPTIONS

  • root_dir: string [required]

    Path to the directory that will contain the Berkeley DB environment, also known as the "Home".

  • db_class: string

    BerkeleyDB class, defaults to BerkeleyDB::Hash.

  • dir_create_mode: integer

    The mode to use when creating the database directory if it does not exist. Defaults to oct(775).

  • env: BerkeleyDB::Env

    Use this Berkeley DB environment instead of creating one.

  • db: BerkeleyDB object

    Use this Berkeley DB object instead of creating one.

HISTORY

Originally created by Jonathan Swartz. Version 0.04 and later maintained by Michael Schout.

SEE ALSO

SOURCE

The development version is on github at https://https://github.com/mschout/perl-chi-driver-bdb and may be cloned from git://https://github.com/mschout/perl-chi-driver-bdb.git

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/mschout/perl-chi-driver-bdb/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Michael Schout <mschout@cpan.org>

COPYRIGHT AND LICENSE

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