Closed cyberknet closed 5 years ago
That's a possibility, yes. We included a static file picker in the dashboard for this purpose, but it would be nice to automatically save the edited scripts, etc.
We don't typically allow script or css editing in our sites (we build them via webpack to deploy) so it never occurred to us.
I am working on a PR for this.
One thought comes to mind though - scripts and stylesheets don't have metadata to be able to control per script if they should be purged or not.
Do you see this as an issue? Would you add a toggle in the back end to control if they (individually) should be purged? Or just leave it on for all as an OOTB expectation that they will be purged?
I would just start by automatically purging them. I don't see an instance where you'd want to keep them from being purged like you would content/media.
Hopefully the best kind of enhancement request where the user submits their own PR to implement it...
This enhancement is completed with PR #13 being merged.
Is it possible to utilize FileService events? link: https://our.umbraco.com/documentation/reference/events/fileservice-events
The idea is to try to catch Stylesheet and Script files being saved, and purge them from CloudFlare cache when they are updated the same way the Media and Content are being done today.