-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Rails.cache.fetch is active in spite of ActionController::Base.perform_caching #20733
Comments
This sounds like expected behaviour to me; maybe the documentation can be improved. It says If you want to prevent all caching, rather than just having AC opt out of using it, |
Well, after looking at the code from the active_support library, I am wondering if low-level caching has ever been meant to answer from |
@matthewd Yeah, got it. But the caching guide of rails is clearly misleading - it talks about the perform_caching as if it governed the while thing, including the low level caching stuff it is describing later on. I'll propose a PR. |
On a related note, what would involve supporting this? |
This issue has been automatically marked as stale because it has not been commented on for at least The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the Thank you for all your contributions. |
Closing, as the doc PR has been merged. Discussion could be restarted elsewhere if some new feature is desirable around this issue. |
I am not sure how to create a simple Minimal Working Example.
This happens when testing my caching behavior, and something along these lines fails:
...even though
false
is printed out for theActionController::Base.perform_caching
.[I set this to false by the
:caching => false
option of the bloc (I use a hook)]If I annihilate caching by switching from the default
:memory_store
to the:null_store
for the testing environment, the test passes as expected.[I just add
config.cache_store = :null_store
intest.rb
]My
action
method uses the core caching from Rails:The text was updated successfully, but these errors were encountered: