public function FileSystemCacheHandler::get in Auth0 Single Sign On 8.2
Parameters
string $key:
Return value
mixed|null
Overrides CacheHandler::get
File
- vendor/
auth0/ auth0-php/ src/ Helpers/ Cache/ FileSystemCacheHandler.php, line 38
Class
Namespace
Auth0\SDK\Helpers\CacheCode
public function get($key) {
$key = md5($key);
if (!file_exists($this->tmp_dir . $key)) {
return null;
}
$file = fopen($this->tmp_dir . $key, 'r');
flock($file, LOCK_EX);
$data = fgets($file);
flock($file, LOCK_UN);
fclose($file);
return unserialize(base64_decode($data));
}