I am using caches_page in controllers, like so:
caches_page :index
Is there a way I can check in the view files whether the action is to be cached or not?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, this is not possible. All the
caches_page-method does is to register a block viaafter_filterwithout storing any additional information. If you need to know wether the current action is to be cached, you will have to provide a clue yourself by ie. an enhanced version ofcaches_page.