On this page
protected function PhpBackend::getByHash
protected PhpBackend::getByHash($cidhash, $allow_invalid = FALSE)
Fetch a cache item using a hashed cache ID.
Parameters
string $cidhash: The hashed version of the original cache ID after being normalized.
bool $allow_invalid: (optional) If TRUE, a cache item may be returned even if it is expired or has been invalidated.
Return value
bool|mixed
File
- core/lib/Drupal/Core/Cache/PhpBackend.php, line 71
Class
- PhpBackend
- Defines a PHP cache implementation.
Namespace
Drupal\Core\CacheCode
protected function getByHash($cidhash, $allow_invalid = FALSE) {
if ($file = $this->storage()->getFullPath($cidhash)) {
$cache = @include $file;
}
if (isset($cache)) {
return $this->prepareItem($cache, $allow_invalid);
}
return FALSE;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!PhpBackend.php/function/PhpBackend::getByHash/8.1.x