Created
September 16, 2015 09:56
-
-
Save gordonbanderson/b64f26b80648f41036f9 to your computer and use it in GitHub Desktop.
How to hook into /dev/build using SilverStripe and Extensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ClearElasticFieldCacheExtension extends Extension { | |
public function onAfterInit() { | |
$cache = SS_Cache::factory('whatever'); | |
$cache->clean(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DevBuildController: | |
extensions: | |
- ClearElasticFieldCacheExtension |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment