It looks like that the number of the pages inside the /pages folder act on the response time of a given page.
The current response time is about 1500ms, it’s huge. But I wasn’t using the cache: enabled: true parameter inside the system.yaml before.
Since I used it, it turns from 1500ms to 250ms. Which is great.
The issue I have (in local and staging), is:
Add multi languages support for 3 different lang (for testing)
Add 3 languages .yaml files for 1 string to test
Create a modular page that include a modular with the string inside using Twig |t.
When switching from language, the string is always the first loaded string. If the include is inside the modular markdown file, it’s working. It looks like there is an issue with modular.
It’s also the same issue with query parameters, please see the example in my attached Archive.
It’s a problem related to getting values from twig/php processing inside the modular child page. They are cached aggressively unless you put cache_enable: false in the markdown page header. So, if you put cache_enable: false in your modular-header.md page, which twig contains the parameter/translation processing, the problem goes away.
Thanks! I’ve just tested - it’s working for both situations: In a modular and in the non-modular with query parameters.
But I don’t understand why my non-modular page is now rendering fast EVEN if I add cache_enable: false ?
I exactly what I wanted : A fast response time + no aggressive cache when using query parameters. So why my page is still rendering fast with the cache_enable parameter to false?
If the global cache is disabled, Grav will perform some costly operations every page load. If instead you just exclude that specific page, it’s going to skip a lot of work.
I tried it but as I have more than 200 modular pages in the app (for SEO content), the result is the same, it’s like having cache:enabled:false in the system.yaml.
Anyone has this issue before or fixed it using another Cache System than File ? Like APC for example? Thanks!