tag = $tag; $this->fileObserver = $fileObserver; } public function get(string $path, string $size): string { return Cache::rememberForever($this->cacheKey($path, $size), fn () => $this->tag->generate($path, $size)); } private function cacheKey(string $path, string $size): string { $normalPath = $this->fileObserver->normalizePath($path); return "resize.{$size}.{$normalPath}"; } }