Cache::FileBackend(3pm)

Cache::FileBackend3pm

Usage

  my $backend = new Cache::FileBackend( '/tmp/FileCache', 3, 000 );
  See Cache::Backend for the usage synopsis.
  $backend->store( 'namespace', 'foo', 'bar' );
  my $bar = $backend->restore( 'namespace', 'foo' );
  my $size_of_bar = $backend->get_size( 'namespace', 'foo' );
  foreach my $key ( $backend->get_keys( 'namespace' ) )
  {
    $backend->delete_key( 'namespace', $key );
  }
  foreach my $namespace ( $backend->get_namespaces( ) )
  {
    $backend->delete_namespace( $namespace );
  }

Overview

The FileBackend class is used to persist data to the filesystem

Methods

See Cache::Backend for the API documentation.

new( $root, $depth, $directory_umask )

Construct a new FileBackend that writes data to the $root directory, automatically creates subdirectories $depth levels deep, and uses the umask of $directory_umask when creating directories.

Properties

(get|set)_root

The location of the parent directory in which to store the files

(get|set)_depth

The branching factor of the subdirectories created to store the files

(get|set)_directory_umask

The umask to be used when creating directories

Releases

12 releases since Debian 3.0 (Woody); the text changed 7 times.

  1. 3.0
  2. 3.1
  3. 4.0–5.0
  4. 6.0
  5. 7
  6. 8
  7. 9–11
  8. 12–13

Author

Original author: DeWitt Clinton <[email protected]>

Last author: $Author: dclinton $

Copyright (C) 2001-2003 DeWitt Clinton

From libcache-cache-perl 1.08-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.