{
    "mode": "perldoc",
    "parameter": "Cache::FileBackend",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3AFileBackend/json",
    "generated": "2026-06-13T19:32:10Z",
    "synopsis": "my $backend = new Cache::FileBackend( '/tmp/FileCache', 3, 000 );\nSee Cache::Backend for the usage synopsis.\n$backend->store( 'namespace', 'foo', 'bar' );\nmy $bar = $backend->restore( 'namespace', 'foo' );\nmy $sizeofbar = $backend->getsize( 'namespace', 'foo' );\nforeach my $key ( $backend->getkeys( 'namespace' ) )\n{\n$backend->deletekey( 'namespace', $key );\n}\nforeach my $namespace ( $backend->getnamespaces( ) )\n{\n$backend->deletenamespace( $namespace );\n}",
    "sections": {
        "NAME": {
            "content": "Cache::FileBackend -- a filesystem based persistence mechanism\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The FileBackend class is used to persist data to the filesystem\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $backend = new Cache::FileBackend( '/tmp/FileCache', 3, 000 );\n\nSee Cache::Backend for the usage synopsis.\n\n$backend->store( 'namespace', 'foo', 'bar' );\n\nmy $bar = $backend->restore( 'namespace', 'foo' );\n\nmy $sizeofbar = $backend->getsize( 'namespace', 'foo' );\n\nforeach my $key ( $backend->getkeys( 'namespace' ) )\n{\n$backend->deletekey( 'namespace', $key );\n}\n\nforeach my $namespace ( $backend->getnamespaces( ) )\n{\n$backend->deletenamespace( $namespace );\n}\n",
            "subsections": []
        },
        "METHODS": {
            "content": "See Cache::Backend for the API documentation.\n",
            "subsections": [
                {
                    "name": "new",
                    "content": "Construct a new FileBackend that writes data to the *$root* directory, automatically creates\nsubdirectories *$depth* levels deep, and uses the umask of *$directoryumask* when creating\ndirectories.\n"
                }
            ]
        },
        "PROPERTIES": {
            "content": "(get|set)root\nThe location of the parent directory in which to store the files\n\n(get|set)depth\nThe branching factor of the subdirectories created to store the files\n\n(get|set)directoryumask\nThe umask to be used when creating directories\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Cache::Backend, Cache::MemoryBackend, Cache::SharedMemoryBackend\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Original author: DeWitt Clinton <dewitt@unto.net>\n\nLast author: $Author: dclinton $\n\nCopyright (C) 2001-2003 DeWitt Clinton\n",
            "subsections": []
        }
    },
    "summary": "Cache::FileBackend -- a filesystem based persistence mechanism",
    "flags": [],
    "examples": [],
    "see_also": []
}