-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Conditional caching #439
Labels
Milestone
Comments
Would also be good if we can can just skip caching completely based on a condition. |
Okay, I made a quick plugin-- just added a couple conditions to check for session.user - It will get me by until we get something nicer implemented. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to specify something to be added to cache keys so we can cache multiple versions depending on the variables passed in to create the key (typical example being if the user is logged in or not).
Implementation could be something like this (from "init"):
caches(action="home", addToKey="request.loggedIn")
request.loggedIn is just a string here, the actual value of it will be used whenever we get / set the cache.
The text was updated successfully, but these errors were encountered: