k = (string) $data['k']; $entity->v = $rawValue; $entity->value = $value; array_key_exists('expired', $data) ?? $entity->expired = (string) $data['expired']; array_key_exists('updated', $data) ?? $entity->updated = (string) $data['updated']; return $entity; } /** * cache key */ private string $k = ''; /** * cached serialized value */ private string $v = ''; /** * * @var mixed $value cached unserialized value */ private $value; /** * datetime of cache expiration */ private string $expired = DBA::NULL_DATETIME; /** * datetime of cache insertion */ private string $updated = DBA::NULL_DATETIME; private function __construct() {} /** * @return mixed */ public function getValue() { return $this->value; } }