<?php
namespace Illuminate\Cache\Events;
// namespace to set
class CacheHit
{
/**
* The key that was hit.
*
* @var string
*/
public $key;// a cache key will be hit
/**
* The value that was retrieved.
*
* @var mixed
*/
public $value;// a value be get by key,in the cache
/**
* The tags that were assigned to the key.
*
* @var array
*/
public $tags;// a tags care about the key
/**
* Create a new event instance.
*
* @param string $key
* @param mixed $value
* @param array $tags
* @return void
*/
public function __construct($key, $value, array $tags = [])
{
$this->key = $key;// set key
$this->tags = $tags;// set tags
$this->value = $value;// set value
}// create a new event instance.
}
每天laravel-20160704|CahceHit
最新推荐文章于 2023-03-01 14:16:51 发布