Open stefankempf opened 1 year ago
btw: I also couldn't invalidate single pages as explained in the docs: https://statamic.dev/static-caching#when-saving
I needed to work around that issue like this:
'collections' => [
'news' => [
'urls' => [
env('APP_URL') . 'de/news',
env('APP_URL') . 'en/news',
]
]
I've had this problem for the best part of a year (see here).
I can see cache invalidation jobs are being fired through horizon but my subsite caches don't get cleared properly.
stefankempf's workaround seems to fix it. Here's the workaround for my localised domains (see my original issue for my full sites configuration):
'rules' => [
'collections' => [
'blog' => [
'urls' => [
config('app.url') . '/blog',
config('app.url_uk') . '/blog',
config('app.url_com') . '/blog'
]
..... lots more rules
Its an old one but ...
Do you have paths set in config/statamic/static_caching.php
(https://statamic.dev/static-caching#multisite)?
IIRC it is required for static cache to be invalidated properly when on multisite.
I haven't set paths but I don't use multiple domains in my projects and I also "only" use half measure, where I don't see any option to set paths and as far as I know, the files don't get rendered into the static storage folder. Is that a wrong assumption?
Bug description
I'm having issues to invalidate the cache for two of my multisite installations. Whenever I save a field inside that global, no page is getting invalidated.
How to reproduce
In
static_caching.php
, I have tried multiple configs like the following, but none were working:or
or
and even hardcoded the url like so:
My sites.php looks like this:
and in my .env, I set the following:
APP_URL=http://domain.test/
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
runtime (new)
Additional details
No response