CacheHit.php
TLDR
The provided file CacheHit.php
is a class that represents a cache hit event in the Illuminate\Cache\Events namespace.
Classes
CacheHit
A class that extends the CacheEvent
class and represents a cache hit event. It has the following properties and methods:
Properties
-
$value
(mixed): The value that was retrieved from the cache.
Methods
-
__construct($key, $value, array $tags = [])
: Constructor method that initializes the CacheHit object. It accepts the following parameters:-
$key
(string): The key that was used to retrieve the value from the cache. -
$value
(mixed): The value that was retrieved from the cache. -
$tags
(array): An optional array of tags associated with the cached item.
-
<?php
namespace Illuminate\Cache\Events;
class CacheHit extends CacheEvent
{
/**
* The value that was retrieved.
*
* @var mixed
*/
public $value;
/**
* Create a new event instance.
*
* @param string $key
* @param mixed $value
* @param array $tags
* @return void
*/
public function __construct($key, $value, array $tags = [])
{
parent::__construct($key, $tags);
$this->value = $value;
}
}