1Cache::FileBackend(3) User Contributed Perl DocumentationCache::FileBackend(3)
2
3
4

NAME

6       Cache::FileBackend -- a filesystem based persistence mechanism
7

DESCRIPTION

9       The FileBackend class is used to persist data to the filesystem
10

SYNOPSIS

12         my $backend = new Cache::FileBackend( '/tmp/FileCache', 3, 000 );
13
14         See Cache::Backend for the usage synopsis.
15
16         $backend->store( 'namespace', 'foo', 'bar' );
17
18         my $bar = $backend->restore( 'namespace', 'foo' );
19
20         my $size_of_bar = $backend->get_size( 'namespace', 'foo' );
21
22         foreach my $key ( $backend->get_keys( 'namespace' ) )
23         {
24           $backend->delete_key( 'namespace', $key );
25         }
26
27         foreach my $namespace ( $backend->get_namespaces( ) )
28         {
29           $backend->delete_namespace( $namespace );
30         }
31

METHODS

33       See Cache::Backend for the API documentation.
34
35       new( $root, $depth, $directory_umask )
36           Construct a new FileBackend that writes data to the $root
37           directory, automatically creates subdirectories $depth levels deep,
38           and uses the umask of $directory_umask when creating directories.
39

PROPERTIES

41       (get|set)_root
42           The location of the parent directory in which to store the files
43
44       (get|set)_depth
45           The branching factor of the subdirectories created to store the
46           files
47
48       (get|set)_directory_umask
49           The umask to be used when creating directories
50

SEE ALSO

52       Cache::Backend, Cache::MemoryBackend, Cache::SharedMemoryBackend
53

AUTHOR

55       Original author: DeWitt Clinton <dewitt@unto.net>
56
57       Last author:     $Author: dclinton $
58
59       Copyright (C) 2001-2003 DeWitt Clinton
60
61
62
63perl v5.28.0                      2015-01-22             Cache::FileBackend(3)
Impressum