Skip to content

Commit

Permalink
Changed File base cache file extensions from '.cache' to '.cache.php'…
Browse files Browse the repository at this point in the history
… to help prevent rendering as plaintext if viewed through a web-server
  • Loading branch information
PHLAK committed Oct 10, 2017
1 parent cfb68fd commit 2e94151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Drivers/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function forget($key)
*/
public function flush()
{
$unlinked = array_map('unlink', glob($this->storagePath . DIRECTORY_SEPARATOR . '*.cache'));
$unlinked = array_map('unlink', glob($this->storagePath . DIRECTORY_SEPARATOR . '*.cache.php'));

return count(array_keys($unlinked, true)) == count($unlinked);
}
Expand All @@ -194,7 +194,7 @@ public function flush()
*/
protected function filePath($key)
{
return $this->storagePath . DIRECTORY_SEPARATOR . sha1($this->prefix($key)) . '.cache';
return $this->storagePath . DIRECTORY_SEPARATOR . sha1($this->prefix($key)) . '.cache.php';
}

/**
Expand Down

0 comments on commit 2e94151

Please sign in to comment.