Closed mortscode closed 3 years ago
I downgraded to version 2.4.4 and the missing cache purge problem persists. I'm baffled.
I installed it into my plugin development environment and I'm getting the same issue. I downgraded craft 1 version and servd-asset-storage 2 versions. Uninstalled all other plugins and the Servd Purge Cache utilities are still missing. Racking my brain to figure out what I might have changed?
In my vendor > servd > craft-asset-storage > src > StaticCache > StaticCache.php
file, I'm seeing the registerEventHandlers()
method:
private function registerEventHandlers()
{
Event::on(
ClearCaches::class,
ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
function (RegisterCacheOptionsEvent $event) {
$event->options[] = [
'key' => 'servd-static-cache',
'label' => Craft::t('servd-asset-storage', 'Servd Static Cache'),
'action' => function () {
$this->clearStaticCache();
},
];
/***
* Deprecated cli key
*/
$event->options[] = [
'key' => 'servd-asset-storage',
'label' => Craft::t('servd-asset-storage', 'Servd Static Cache (Deprecated)'),
'action' => function () {
$this->clearStaticCache();
},
];
}
);
}
The "Servd Static Cache" & Depreciated checkboxes are still present in the utilities on my Production build from 4 days ago:
I have some updates to push but I'm hesitant to do so because we rely pretty heavily on the ability to dump the cache.
Hey @mortscode
The static cache functionality within the plugin is disabled in local dev and only activates when running within Servd. That's because the code for the static cache integration talks directly to some components within the Servd platform that wouldn't exist in your local dev env, so would cause errors when updating entries etc!
Nothing significant has changed with the static cache implementation recently so you should be ok to get things updated. You can test in Staging within Servd first too if you'd like to double check everything is working as expected.
I was having an issue with my plugin working locally—behaving in a way that historically that has been solved with a cache clear. I thought I was losing my mind. Gotta stop staying up so late I guess.
Sorry about that. Please throw this issue off a high cliff.
Servd Assets Plugin / Version 2.4.6
Servd Static Cache Purge is no longer in
Utilities > Cache
When I run
clear-caches/servd-static-cache
I'm also getting an error: