src/Dependencies/Dependency.php
public function isChanged($cache): bool
    {
        if ($this->reusable) {
            $hash = $this->generateReusableHash();
            if (!array_key_exists($hash, self::$_reusableData)) {
                self::$_reusableData[$hash] = $this->generateDependencyData($cache);
            }
            $data = self::$_reusableData[$hash];
        } else {
            $data = $this->generateDependencyData($cache);
        }

        return $data !== $this->data;
    }
public function isChanged($cache): bool
    {
        if ($this->reusable) {
            $hash = $this->generateReusableHash();
            if (!array_key_exists($hash, self::$_reusableData)) {
                self::$_reusableData[$hash] = $this->generateDependencyData($cache);
            }
            $data = self::$_reusableData[$hash];
        } else {
            $data = $this->generateDependencyData($cache);
        }

        return $data !== $this->data;
    }
public function isChanged ( $ cache ) : bool { if ( $ this -> reusable ) { $ hash = $ this -> generateReusableHash ( ) ; if ( ! array_key_exists ( $ hash , self :: $ _reusableData ) ) { self :: $ _reusableData [ $ hash ] = $ this -> generateDependencyData ( $ cache ) ; } $ data = self :: $ _reusableData [ $ hash ] ; } else { $ data = $ this -> generateDependencyData ( $ cache ) ; } return $ data !== $ this -> data ; }
Checks whether the dependency is changed.
@param \Yiisoft\Cache\CacheInterface $cache the cache component that is currently evaluating this dependency
@return bool whether the dependency has changed.
Checks whether the dependency is changed .