Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Sitewide Forms and caching

Solved by Fabian Saur View solution

Started by Fabian Saur 8 years ago · 1 replies · 596 views
8 years ago

Hi everyone, I'm pretty new to Grav and just "finished" our first Grav site. We have a form on every page that loads in a lightbox thingy, linked from the main nav. I linked the site here: /forum/showcase/sample-grav-sites-part-ii-t7213?u=fabbow . From there, when you click "Request a demo" in the main nav, it opens. The form is an invisible, unroutable page without parents and one child (the "success" page). I use a partial that loads the forms page, and renders heading, content and the form like this {% include "forms/form.html.twig" with { form: forms('request-demo-form') } %}

So here's the problem: The form disappeared after some time when I used caching (the box then just displayed the heading and content) and I couldn't figure out why, or even a pattern. I tried disabling Twig caching globally to no luck, the only thing that got it working was disabling Caching itself. The site still runs pretty fast but caching removes those sweet 10-20ms from the server response so I'd appreciate any input here :)

last edited 06/01/18 by Fabian Saur
8 years ago Solution

...the Server had an active APCu module and my cache driver was set to auto, now everything makes a bit more sense. Using "file" seems to have fixed this.

Suggested topics

Topic Participants Replies Views Activity
Support · by BenLaKnet, 5 days ago
1 123 2 days ago
Support · by BenLaKnet, 1 week ago
5 195 2 days ago
Support · by kskt, 3 days ago
0 45 3 days ago
Support · by David Meissner, 3 days ago
0 44 3 days ago
Support · by David Meissner, 4 days ago
3 92 3 days ago