{
    "mode": "info",
    "parameter": "Cache::Memory",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/Cache%3A%3AMemory/json",
    "generated": "2026-07-05T11:45:45Z",
    "synopsis": "use Cache::Memory;\nmy $cache = Cache::Memory->new( namespace => 'MyNamespace',\ndefaultexpires => '600 sec' );\nSee Cache for the usage synopsis.",
    "sections": {
        "Cache::Memory(3pm)    User Contributed Perl Documentation   Cache::Memory(3pm)": {
            "content": "",
            "subsections": []
        },
        "NAME": {
            "content": "Cache::Memory - Memory based implementation of the Cache interface\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Cache::Memory;\n\nmy $cache = Cache::Memory->new( namespace => 'MyNamespace',\ndefaultexpires => '600 sec' );\n\nSee Cache for the usage synopsis.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Cache::Memory class implements the Cache interface.  This cache\nstores data on a per-process basis.  This is the fastest of the cache\nimplementations, but is memory intensive and data can not be shared\nbetween processes.  It also does not persist after the process dies.\nHowever data will remain in the cache until cleared or it expires.  The\ndata will be shared between instances of the cache object, a cache\nobject going out of scope will not destroy the data.\n",
            "subsections": []
        },
        "CONSTRUCTOR": {
            "content": "my $cache = Cache::Memory->new( %options )\n\nThe constructor takes cache properties as named arguments, for example:\n\nmy $cache = Cache::Memory->new( namespace => 'MyNamespace',\ndefaultexpires => '600 sec' );\n\nSee 'PROPERTIES' below and in the Cache documentation for a list of all\navailable properties that can be set.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "See 'Cache' for the API documentation.\n",
            "subsections": []
        },
        "PROPERTIES": {
            "content": "Cache::Memory adds the property 'namespace', which allows you to\nspecify a different caching store area to use from the default.  All\nmethods will work ONLY on the namespace specified.\n\nmy $ns = $c->namespace();\n$c->setnamespace( $namespace );\n\nFor additional properties, see the 'Cache' documentation.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Cache\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Chris Leishman <chris@leishman.org>\nBased on work by DeWitt Clinton <dewitt@unto.net>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (C) 2003-2006 Chris Leishman.  All Rights Reserved.\n\nThis module is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\nKIND, either expressed or implied. This program is free software; you\ncan redistribute or modify it under the same terms as Perl itself.\n\n$Id: Memory.pm,v 1.9 2006/01/31 15:23:58 caleishm Exp $\n\nperl v5.32.0                      2021-01-01                Cache::Memory(3pm)",
            "subsections": []
        }
    },
    "summary": "Cache::Memory - Memory based implementation of the Cache interface",
    "flags": [],
    "examples": [],
    "see_also": []
}