- Work on extension integration.

- WIP of the inline view token
- Began work on compiled-code caching
This commit is contained in:
mcndave committed 2019-09-04 15:14:49 +00:00
1 parent 66c7b349d1
commit f8e3dbd60f
8 files changed
+105 -11

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
<?php
namespace Picea\Caching;
class Opcache {
protected string $cachePath = "";
public function __construct(string $cachePath)
{
$this->cachePath = $cachePath;
}
public function loadFile(string $fileName) : bool
{
if ( file_exists($path = $this->filePath($fileName)) ) {
require_once($path);
return true;
}
return false;
}
public function saveFile(string $fileName, string $content) : bool
{
file_put_contents($this->filePath($fileName), $content);
return false;
}
public function filePath(string $fileName) : string
{
return $this->cachePath . $fileName;
}
}