- Making sure cache file exist before invalidating; creating it if it ain't
This commit is contained in:
parent
e2915c356a
commit
ed63c1ffe5
|
@ -12,7 +12,7 @@ class CacheInvalidator
|
||||||
protected string $filePath,
|
protected string $filePath,
|
||||||
protected bool $updateVersion = false,
|
protected bool $updateVersion = false,
|
||||||
) {
|
) {
|
||||||
if ($this->updateVersion) {
|
if ($this->updateVersion || ! file_exists($this->filePath)) {
|
||||||
$this->version = $this->generateVersion();
|
$this->version = $this->generateVersion();
|
||||||
file_put_contents($this->filePath, $this->version);
|
file_put_contents($this->filePath, $this->version);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue