{
    "mode": "perldoc",
    "parameter": "Cache::CacheSizer",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Cache%3A%3ACacheSizer/json",
    "generated": "2026-06-15T11:19:31Z",
    "synopsis": "use Cache::CacheSizer;\nmy $sizer = new Cache::CacheSizer( $cache, $maxsize );\n$sizer->limitsize( $newsize );",
    "sections": {
        "NAME": {
            "content": "Cache::CacheSizer -- component object for managing the size of caches\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The CacheSizer class is used internally in SizeAware caches such as SizeAwareFileCache to\nencapsulate the logic of limiting cache size.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Cache::CacheSizer;\n\nmy $sizer = new Cache::CacheSizer( $cache, $maxsize );\n\n$sizer->limitsize( $newsize );\n",
            "subsections": []
        },
        "METHODS": {
            "content": "",
            "subsections": [
                {
                    "name": "new",
                    "content": "Construct a new Cache::CacheSizer object for the cache *$cache* with a maximum size of\n*$maxsize*.\n"
                },
                {
                    "name": "update_access_time",
                    "content": "Inform the cache that the object specified by *$key* has been accessed.\n"
                },
                {
                    "name": "limit_size",
                    "content": "Use the sizing algorithms to get the cache down under *$newsize* if possible.\n"
                }
            ]
        },
        "PROPERTIES": {
            "content": "getmaxsize\nThe desired size limit for the cache under control.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Cache::Cache, Cache::CacheMetaData, Cache::SizeAwareCache\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::CacheSizer -- component object for managing the size of caches",
    "flags": [],
    "examples": [],
    "see_also": []
}