nuxt-ssr-cache icon indicating copy to clipboard operation
nuxt-ssr-cache copied to clipboard

feat-cache-rightful

Open D-Brick opened this issue 5 years ago • 1 comments

Provide a callback function in config.cache, hoping to develop some personalized logic to judge whether the cached value is legal, if it is legal, set the cached value, otherwise do not set it. Please see if this is feasible, because I hope that the plug-in can provide such capabilities in development, thank you very much.

D-Brick avatar Jul 07 '20 15:07 D-Brick

This is the case for my unit test:

mocha tests/cache-builders.spec.js

memoryCache ✓ should return cached result

redisCache ✓ should return cached result (229ms) ✓ should configure on initialization

memcached ✓ should return cached result (450ms)

multi ✓ memory+memcached should return cached result ✓ memory+redis should return cached result

6 passing (733ms)

D-Brick avatar Jul 07 '20 15:07 D-Brick