diff --git a/plugins/cache-on-save/cache-on-save.php b/plugins/cache-on-save/cache-on-save.php index 6756326..1fa6f4e 100644 --- a/plugins/cache-on-save/cache-on-save.php +++ b/plugins/cache-on-save/cache-on-save.php @@ -1,6 +1,7 @@ checksum() + lang) (Pages::buildRegularPages). + // With cache.check.method:folder that index can survive a create — a fresh + // entry then stays invisible to the API (GET /api/v1/pages{route} 404s), so + // opening the just-posted entry for editing shows "this entry no longer + // exists". invalidateCache() touches system.yaml, bumping config->checksum() + // so the index key changes and the tree rebuilds on the next request. $this->grav['cache']->deleteAll(); + Cache::invalidateCache(); } /**