Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to hook into /dev/build using SilverStripe and Extensions
<?php
class ClearElasticFieldCacheExtension extends Extension {
public function onAfterInit() {
$cache = SS_Cache::factory('whatever');
$cache->clean();
}
}
DevBuildController:
extensions:
- ClearElasticFieldCacheExtension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment