Source of file SiteConfigCacheable.php
Size: 0,579 Bytes - Last Modified: 2021-12-24T06:44:18+00:00
/var/www/docs.ssmods.com/process/src/code/extensions/SiteConfigCacheable.php
12345678910111213141516171819202122232425 | <?php /** * * Gives {@link SiteConfig} objects caching abilities. * * @author Deviate Ltd 2015 http://www.deviate.net.nz * @package silverstripe-cachable */ class SiteConfigCacheable extends DataExtension { public function onAfterWrite() { $stage_mode_mapping = array( "Stage" => "Stage", "Live" => "Live", ); foreach ($stage_mode_mapping as $stage => $mode) { $service = new CacheableNavigationService($mode, $this->owner); $service->refreshCachedConfig(); } } } |