protected function getFromCache($guid)
{
$entity = $this->entity_cache->get($guid);
if ($entity) {
return $entity;
}
$memcache = _elgg_get_memcache('new_entity_cache');
$entity = $memcache->load($guid);
if (!$entity instanceof ElggEntity) {
return false;
}
// Validate accessibility if from memcache
if (!elgg_get_ignore_access() && !has_access_to_entity($entity)) {
return false;
}
$this->entity_cache->set($entity);
return $entity;
}