public setHasCache ( string | array $key, mixed $value, yii\caching\Dependency | array $dependency = null, $cacheExpiration = null ) : boolean | ||
$key | string | array | The identifier key or a array to store complex keys |
$value | mixed | The value to store in the cache component. |
$dependency | yii\caching\Dependency | array | Dependency of the cached item. If the dependency changes, the corresponding value in the cache will be invalidated when it is fetched via get(). This parameter is ignored if $serializer is false. You can also define an array with defintion which will generate the Object instead of object is provided. |
return | boolean | Whether set has been success or not |