Closed tobystokes closed 3 years ago
That's default behaviour of Kirby and intended if you have caching enabled. When you rebuild, you will have to delete the cache manually. For example, run:
npm run build && rm -rf storage/cache/example
A simpler solution would be to add a custom script. Consider adapting your package.json
with a script to delete your cache folder without having to manually adjust the rm -rf
script:
"scripts": {
"kirby:flush-cache": "find storage/cache -maxdepth 1 -mindepth 1 -type d -exec rm -rf '{}' \\;",
"build": "... && npm run kirby:flush-cache",
},
With following
.env
settings:If I regenerate the assets with
npm run build
, the path in<?= vite()->js() ?>
doesn't get updated to the latest hash specified in the manifest, because_app-index.php
is cached.Let me know if I'm misunderstanding something here! Would it be enough to just exclude the home page from ever being cached?