Open Nicola1971 opened 3 weeks ago
What's your case? Do you need to cache something?
Just testing a Evo 1.4 plugin with Evo 3x. Anyway, I just found this bug, reported by you, five years ago :) https://github.com/evolution-cms/evolution/issues/998
@Nicola1971 I've declared this method as deprecated, so it would be better not to use it at all. In the case of your PageCacheManager plugin, you needn't getCacheFolder, because you can call $modx->clearCache($doc_id) instead of all this code: https://github.com/Nicola1971/PageCacheManager/blob/main/install/assets/plugins/PageCacheManager.tpl#L64-L101;
Is there anyway a replacement for getCacheFolder? without hardcoding the path? I didn't know you could use clearcache with doc_id! I don't think I ever read that in the documentation. Thanks a lot!
clearCache($doc_id) streamlined my code a lot :)
I don't think we need a replacement, because there's Storage facade in 3.x.
is there still clearcache on 3x?
Yes.
Summary
Evo 3.1.29 return just 'cache/' with $modx->getCacheFolder()
Steps to reproduce.
Evo 1.4.35 with $modx->getCacheFolder()
'assets/cache/'
Evo 3.1.29 with $modx->getCacheFolder()
'cache/' instead of 'core/storage/bootstrap'
Observed behavior
EvoCMS version
Evo 3.1.29
PHP version
8.1.29