AO detects the change and will create a new autoptimized file in cache. The old autoptimized file remains in cache as well though, so emptying the cache now and again would not hurt 😉
hope this clarifies,
frank
Of course Autoptimize will immediately detect changes to CSS/JS but if someone is also a cache plugin such as W3TC, that plugin will still refer to the old filename till the HTML file expires or till the garbage collection runs (whichever is later) and that plugin’s cache has to be emptied.
Frank, thanks for the clarification and for creating a great plugin.
superpoincare, I don’t use W3TC — it’s too complicated, so I use Super Cache instead, and it’s set to expire every hour so I’m not going to worry about it.
Yitwail,
Understood your point. My point was to simply add and it’s true for any plugin which caches HTML.
Interestingly, I found this plugin: W3TC Auto Pilot. (although not relevant to your purpose but still nice).
https://ww.wp.xz.cn/plugins/w3tc-auto-pilot/
It has: “Purge cache, whenever: … the theme is edited in Customizer.”