Emitted when a new response is stored in the cache.
cache.on(MemorizeEventType.Set, (e) => { console.log(`stored ${e.key} — status ${e.statusCode}`);}); Copy
cache.on(MemorizeEventType.Set, (e) => { console.log(`stored ${e.key} — status ${e.statusCode}`);});
The stored response body.
Content-Type header value of the stored response.
Content-Type
Expiry timestamp in ms, or null if no TTL was set.
null
The cache key (full request URL).
HTTP status code of the stored response.
Emitted when a new response is stored in the cache.
Example