Usage Examples
// [Project]/config/plugin.jsexportscache = enable: true package: 'egg-cache-manager'; // [Project]/config/config.default.js // Optional! module { const config = exports = {}; ... configcatbox = client: store: // set cache store, default is catbox-memory // store options configcache = // catbox policy settings client: catbox: 'xxx' // required for multi catbox clients (key by config.catbox.clients) segment: 'partition' // policy segment, // catbox policy options ; ... return config;}; // [Project]/app/controller/home.js // example// all methods are promisifiedawait appcache;let a = await appcache;// get cache value by // create function (if value expire), // format function (return formatted cache value), // dependency setting (tag cache dependency)// inspired by PHP Yii2 cache component (currently on support tag dependency)// @see [Yii2 Cache dependencies](https://github.com/yiisoft/yii2/blob/master/docs/guide/caching-data.md#cache-dependencies-)let b = await cache