/** * Returns $cacheKey as the cache key, so `computeCacheKey()` has * to be called before `cache()`. * * @return string */ protected function getInputCacheKey($input) { if (is_file($input)) { return $this->cacheKey; } else { # If $input is not a file, let the parent throw the exception. return parent::getInputCacheKey($input); } }