/**
* Configure locations from the cache
*
* @param SystemCache $cache The system cache
* @return bool
* @access private
*/
public function configureFromCache(SystemCache $cache)
{
$data = $cache->load('view_locations');
if (!is_string($data)) {
return false;
}
// format changed, check version
$data = unserialize($data);
if (empty($data['version']) || $data['version'] !== '2.0') {
return false;
}
$this->locations = $data['locations'];
$this->cache = $cache;
return true;
}