dw.system
Class CacheMgr
![](https://sfcclearning.com/infocenter/DWAPI/scriptapi/html/api/images/inherit.gif.pagespeed.ce.4vPrGmNumQ.gif)
The CacheMgr class is the entry point for using custom caches.
The CacheMgr can manage multiple custom caches that share one storage space. Each individual cache has a unique ID and an optional expiration time that specifies the maximum time (in seconds) an entry is stored in the cache. For registering caches inside the cartridge root folder, a 'package.json' file with a 'caches' entry must exist. The registration of caches is independent of any site context.
"caches": "./caches.json"The caches entry links to a JSON file, with a path relative to the 'package.json' file. This file lists all registered caches inside the caches property:
{ "caches": [ { "id": "UnlimitedTestCache" }, { "id": "TestCacheWithExpiration", "expireAfterSeconds": 10 } ] }
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values