protected function crumbs_PluginSystem_PluginInfo::keysToCache in Crumbs, the Breadcrumbs suite 7.2
Which keys to load from persistent cache.
Return value
string[]
Overrides crumbs_Container_AbstractLazyDataCached::keysToCache
File
- lib/
PluginSystem/ PluginInfo.php, line 47
Class
- crumbs_PluginSystem_PluginInfo
- Info about available plugins and their weights.
Code
protected function keysToCache() {
// Plugin cache is special, because these are objects.
// If this fails, we want to totally circumvent the cache.
$callback_before = ini_get('unserialize_callback_func');
ini_set('unserialize_callback_func', '_crumbs_unserialize_failure');
try {
// Trigger $this->__get('plugins').
$this->plugins;
} catch (crumbs_UnserializeException $exception) {
// Don't cache anything this round.
return array();
}
ini_set('unserialize_callback_func', $callback_before);
return array(
'weights',
'pluginsCached',
'defaultWeights',
'pluginRoutes',
'pluginOrder',
);
}