- <?php
-
-
- namespace yii\caching;
-
- use Yii;
- use yii\base\InvalidConfigException;
-
-
- class FileDependency extends Dependency
- {
-
-
- public $fileName;
-
-
-
-
- protected function generateDependencyData($cache)
- {
- if ($this->fileName === null) {
- throw new InvalidConfigException('FileDependency::fileName must be set');
- }
-
- return @filemtime(Yii::getAlias($this->fileName));
- }
- }
|