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

CSRF tag cached #478

Open
HashNotAdam opened this issue Jul 27, 2012 · 5 comments
Open

CSRF tag cached #478

HashNotAdam opened this issue Jul 27, 2012 · 5 comments

Comments

@HashNotAdam
Copy link
Contributor

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.

@mariovisic
Copy link
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.

@HashNotAdam
Copy link
Contributor Author

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?

@did
Copy link
Member

did commented Jul 28, 2012

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 ?

@HashNotAdam
Copy link
Contributor Author

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.

@did
Copy link
Member

did commented Jul 30, 2012

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 milestones: 3.1, 3.0 Oct 21, 2015
@did did modified the milestones: 3.2, 3.1 Jan 19, 2016
@did did modified the milestones: 3.2, 4.1 Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants