Skip to content

Conversation

@D-Brick
Copy link

@D-Brick D-Brick commented Jul 7, 2020

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
Copy link
Author

D-Brick commented Jul 7, 2020

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 D-Brick changed the title feat-cache-right-ful feat-cache-rightful Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant