Skip to content

Instantly share code, notes, and snippets.

@gordonbanderson
Created September 16, 2015 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gordonbanderson/b64f26b80648f41036f9 to your computer and use it in GitHub Desktop.
Save gordonbanderson/b64f26b80648f41036f9 to your computer and use it in GitHub Desktop.
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