mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #14081: Added yii\caching\CacheInterface
to make custom cache extensions adoption easier
This commit is contained in:

committed by
Alexander Makarov

parent
2b7e8be1e8
commit
cb53b2feec
@ -42,7 +42,7 @@ abstract class Dependency extends \yii\base\Object
|
||||
/**
|
||||
* Evaluates the dependency by generating and saving the data related with dependency.
|
||||
* This method is invoked by cache before writing data into it.
|
||||
* @param Cache $cache the cache component that is currently evaluating this dependency
|
||||
* @param CacheInterface $cache the cache component that is currently evaluating this dependency
|
||||
*/
|
||||
public function evaluateDependency($cache)
|
||||
{
|
||||
@ -68,7 +68,7 @@ abstract class Dependency extends \yii\base\Object
|
||||
|
||||
/**
|
||||
* Checks whether the dependency is changed
|
||||
* @param Cache $cache the cache component that is currently evaluating this dependency
|
||||
* @param CacheInterface $cache the cache component that is currently evaluating this dependency
|
||||
* @return bool whether the dependency has changed.
|
||||
* @since 2.0.11
|
||||
*/
|
||||
@ -111,7 +111,7 @@ abstract class Dependency extends \yii\base\Object
|
||||
/**
|
||||
* Generates the data needed to determine if dependency is changed.
|
||||
* Derived classes should override this method to generate the actual dependency data.
|
||||
* @param Cache $cache the cache component that is currently evaluating this dependency
|
||||
* @param CacheInterface $cache the cache component that is currently evaluating this dependency
|
||||
* @return mixed the data needed to determine if dependency has been changed.
|
||||
*/
|
||||
abstract protected function generateDependencyData($cache);
|
||||
|
Reference in New Issue
Block a user