프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$cacheEnabled | If enabled and the cache component is available. If disabled it will fully ignore the any caching but does not throw exception. | ||
$cacheExpiration | Defined the duration of the caching lifetime in seconds. 3600 = 1 hour, 86400 = 24 hours. 0 is forever |
메소드 | 설명 | |
---|---|---|
deleteHasCache ( string | array $key ) : boolean | Remove a value from the cache if caching is enabled. | |
getHasCache ( string | array $key ) : mixed | boolean | Get the caching data if caching is allowed and there is any data stored for this key. | |
isCachable ( ) : boolean | Check if the current configuration of the application and the property allows a caching of the language container data. | |
setHasCache ( string | array $key, mixed $value, yii\caching\Dependency | array $dependency = null, $cacheExpiration = null ) : boolean | Store cache data for a specific key if caching is enabled in this application. |
public isCachable ( ) : boolean | ||
리턴 | boolean |
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. |
리턴 | boolean | Whether set has been success or not |
public $cacheEnabled |