Hi Peter, thanks for getting back to me. I do think there is more to it...
We use JotCache to cache our website pages. JotCache is cleaned when we trigger Cache Cleaner (right?). But JCH optimize also (besides cache file in the cache folder cache/plg_jch_optimize) uses links in the source code like this:
So these file links are stored in the JotCache cache files. Now when JCH refreshes it's cache new links/files are created but the cache page still tries to load the older files. And then we have no CSS and JS. Let say we have set JotCache to refresh ever 15 minutes. And JCH to cache 60 minutes. Most of the time this will be OK. But when the lifetime of the JCH cache has 2 minutes left, and then we use Cache Cleaner to clean the cache (als JotCache) the site will remain to work fine for 2 minutes. But then we have 13 minutes of working files until JCH recaches.
So to prevent this from happening maybe we could trigger JCH to execute a 'cache clean' like it's button on the first screen of the plugin does. So a setting in Cache Cleaner to trigger this when cache is cleaned. I am not sure if this is technically possible. I thin just clearing the folders (media/plg_jchoptimize) might not be enough. Bit maybe it is... Not sure how JCH handles missing files here. It might trigger a recache?
Do you think I am right about how this works and could cause an issue? I know this is an issue between 'JotCache' and 'JCH' but using Cache Cleaner we could maybe solve this. Unless I am all wrong about this of course 😉
How JCH deals with missing files is something you need to ask JCH.
All Cache Cleaner does is... well... clean the cache.
It will empty the main cache folder. It also has a built in functionality to purge the JotCache cache.
Again, how what these extensions do after cache is cleaned is outside the scope and control of Cache Cleaner.
All the onJchCacheExpired trigger does - as far as I can tell from the JCH code - is that it empties the /cache/plg_jch_optimize folder.
But Cache Cleaner already empties the entire cache folder. So I don't see what added benefit this would have.
Thanks for looking into this for me. I thought JCH also cached some files in the media folder. But I might be wrong. The thing is, when JCH is activated there are two file links to a combined en optimized CSS and JS files. This point to a file in the media folder. Not the cache. We have seen sites that can not seem to find these files (I think cached pages) resulting in a page without CSS/JS functionality. So that's what I am trying to prevent. I am alo in contact with the JCH optimize creator and he will try to modify the plugin to not only trigger the cleanu of Joomla cache bnut also JotCache cache. That might help. But I think this is more of a cache 'timing' option somehow. Anyway, I think I nee to figure this out with the JCH guy 😉 Again thanks for listening.