Closed rickfeuerabend closed 2 months ago
There is an option (enablePurgeSingleFile
) in EM. Did you try it?
Hi, thanks for fast answer.
Yes I tested it but:
When I read your code correct then you hook into the global clear cache function in ext_localconf.php
:
with:
// Register additional clear_cache method
--
11 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][] = \Causal\Cloudflare\Hooks\TCEmain::class . '->clear_cacheCmd';
In this function you check if it is requested for ALL pages
if (GeneralUtility::inList('all,pages', $params['cacheCmd'])) {
or not. In the else case you are using your suggested parameter.
But it can only reach the first case because you never hook into the "Clear cache for this page" command.
Is that right?
Thanks for help and hopefully I'm wrong and it is already possible to use ;)
Or is this $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][]
hook responsible for both cache clear ways?
In my tests, when I switch to Web > List and use the "clear cache for this page" button, the hook is properly invoked:
Hm, ok exactly in this way I tested it. Then I need to debug in the code why it is not working. But again thanks for your fast help!
I confirm this works as expected with latest version, but the actual cache flush fails as described in #21. I'm currently working on it. Closing this ticket as that part "works" :)
Hi,
it would be nice if the cloudflare cache for a single page could be purged. ("Clear cache for this page")
At the moment the complete page cache is purged in the function
clearCloudflareCache
(TCEmain.php)Is this feature planned in the next time?
Thanks for feedback.