You are here

public function FileSystemBackend::__construct in File Cache 8

Constructs a FileBackend cache backend.

Parameters

\Drupal\Core\File\FileSystemInterface $fileSystem: The service for interacting with the file system.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Drupal\Core\Cache\CacheTagsChecksumInterface $checksumProvider: The cache tags checksum provider.

string $path: The path or stream wrapper URI to the folder where the cache files are stored.

string $strategy: The cache strategy to use.

File

src/Cache/FileSystemBackend.php, line 86

Class

FileSystemBackend
A cache backend that stores cache items as files on the file system.

Namespace

Drupal\filecache\Cache

Code

public function __construct(FileSystemInterface $fileSystem, TimeInterface $time, CacheTagsChecksumInterface $checksumProvider, $path, $strategy) {
  $this->fileSystem = $fileSystem;
  $this->time = $time;
  $this->checksumProvider = $checksumProvider;
  $this->path = rtrim($path, '/') . '/';
  $this->strategy = $strategy;
}