boldenamsterdam / htmlcache

Cache pages to HTML and boost website performance on Craft CMS 3
MIT License
31 stars 21 forks source link

Some more FAQs for you... #12

Open amityweb opened 5 years ago

amityweb commented 5 years ago

Does this plugin work with forms that use getCsrfInput()? Because getCsrfInput() will need to be generated each page load

Can we exclude areas, perhaps based on segments? I have a members area which I don't need or want cached.

Can we exclude sections of the page? For example if we had a template include that generates something random, we would want to exclude it.

Thanks

boldenamsterdam commented 5 years ago

Hi @amityweb ,

Currently this is not possible but we are planning to release soon this functionality.

Keep tuned!

luke-nehemedia commented 5 years ago

I would love that, too!

dueddel commented 5 years ago

I recently implemented an exclude feature. It's a new table field in the settings where you can add URL paths to be ignored from cache. See pull request #17 for details.

You can only exclude whole pages from being cached, though. So, with my changes you can't ignore single segments of a page, as you wished. But hey, it's something. :)

By the way, with my changes I also enabled you to use regular expressions to exclude a whole bunch of pages (instead of adding every single one).

Thus, you can exclude following pages from being cached, for instance:

Just see the instructions and info texts of the new field in the plugin settings.

…And no need to worry: I also had multi-sites in mind.

ambidustrious commented 4 years ago

Are there still plans to exclude areas of code - specifically would like to exclude FreeForm forms when my user leverages form builder