CSRF tag cached #478

HashNotAdam opened this Issue Jul 27, 2012 · 5 comments

3 participants


When you enable page caching, any CSRF tags on the page are also cached.

It would be useful to be able to receive the tag via AJAX if the page is cached.

Locomotive member

Could the solution be to not cache pages that contain forms?

The frontend for locomotive should be fairly quick, you won't need caching unless you are receiving a huge amount of requests.


Why didn't I think of that‽ :\

Just to be clear, are you officially stating that there is no intension for LocomotiveCMS to support high traffic sites or any site that requires complex logic to load a page?

Locomotive member

well, I thought about it this morning and Mario is right. It does not make sense to cache page with a form.
However, we need to partially cache some parts of the page. For instance, we could have a "cache" liquid tag which will fit, I'm sure, your needs, Adam. What do you guys think ?


That sounds great; I was concerned about the amount of new work that would be required to introduce partial caching but, if you think it's feasible, it would certainly solve the issue of pages that require intensive logic as well as a form.

I would also be interested to know how some of the other CMSs handle the problem of methods that must not be cached. It certainly isn't an issue that is unique to LocomotiveCMS, and I've never had to worry about it before, so are probably some intelligent solutions out there to learn from.

Locomotive member

I really don't think partial caching is something very hard to implement. Let's keep this ticket open for now.
In the meanwhile, if you have more information about how the other CMS do, feel free to post them here. thanks !

@did did modified the milestone: 3.1, 3.0 Oct 21, 2015
@did did modified the milestone: 3.2, 3.1 Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment