Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support Statamic Caching for Multi-Lingual sites #1277
We have a bilingual website, we expect that a page would be cached both in original language and translated.
Even if the url is different, the first page loaded is the only version cached and so reachable.
Steps to reproduce
Updated from an older Statamic or fresh install:
List of installed addons:
Caching.yaml file setting:
@dojchek We figure out that the cache works if there is a different path of the page.
If we used:
the only page cached is the original one (english)
So we used different slug for every page/entry.
The only problem was the homepage, because we had:
and we deal with:
Hope this will help you.
Hey guys sorry for the delay on this.
I got it working using these steps. Let me know if you have any success.
I'm fighting with another problem now: I can't cache same pages of different domains that points to the same server (e.g. luceplan.com and luceplanusa.com). Same problem: the first I load, is the first cached. You know if there is a workaround?
@jasonvarga could you please elaborate more how the Caching decides to create a static html file?
I'm running with only one .htaccess file to avoid redundance, with the following core rewrite rule:
From Statamic's perception, this shouldn't change anything, right?
But when I link
When creating the static HTML files, Statamic is ignoring the
I conducted some experiments, also with an extra
Statamic will always leave out the
But if Statamic would use
@andypillip Completely agree with you on this one.
@jasonvarga is it possible that
I tried this:
static_caching_invalidation: collections: assistant: urls: - /assistent - /assistant
It works for the default locale
Because of before mentioned bug I'd like to exclude my English home page from the cache, which is not possible. It might not make sense to exclude locales from caching, though. Just documenting it (: