diff --git a/mailpoet/lib/Config/TwigFileSystemCache.php b/mailpoet/lib/Config/TwigFileSystemCache.php new file mode 100644 index 0000000000..e993102111 --- /dev/null +++ b/mailpoet/lib/Config/TwigFileSystemCache.php @@ -0,0 +1,21 @@ +directory = \rtrim($directory, '\\/') . '/'; + parent::__construct($directory, $options); + } + + public function generateKey(string $name, string $className): string { + $hash = \hash('sha256', $className); + return $this->directory . $hash[0] . $hash[1] . '/' . $hash . '.php'; + } +}