prefix = $prefix; $this->ttl = $ttl; } public function remember(string $key, callable $callback) { return Cache::remember($this->getCacheKey($key), $this->ttl, $callback); } public function forget(string $key): void { Cache::forget($this->getCacheKey($key)); } public function tags(array $tags): self { $this->prefix = implode(':', $tags) . ':'; return $this; } protected function getCacheKey(string $key): string { return $this->prefix . $key; } }