Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat-cache-rightful #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat-cache-rightful #29

wants to merge 3 commits into from

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