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

Limit keys per endpoint, add purge hook #73

Open
sarkistlt opened this issue Apr 19, 2019 · 2 comments
Open

Limit keys per endpoint, add purge hook #73

sarkistlt opened this issue Apr 19, 2019 · 2 comments

Comments

@sarkistlt
Copy link

First thank you for library really helpful!!
Just a couple suggestion to improve:

  • would be nice to have hooks to purge cache lets say after patch or create
  • also would be really great to be able to set a limit let's say store only latest 100 keys per endpoint etc. could be really useful.
@idealley
Copy link
Owner

For the first point, you can easily call the the invalidation route with the required params, and it could be done in a hook.

But indeed we could do a generic hook for that I will try to make the time.

The second point is a good idea, just a question do you have storage issues with redis? Routes will be automatically deleted when they expire.

@sarkistlt
Copy link
Author

for the second one I don’t have any problems with the storage but it’s still useful to have control on the quantity of the keys per endpoint. Just an example, any eCom. site, user will login and shop for ~15m, and we have 500k users in db and ~100 real time users at a time. Of corse we don’t want to use cache in this case as it is because it will blow redis, but if we can limit it let’s say by 500 entries then it will solve this problem and will increase querying speed for online users

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

No branches or pull requests

2 participants