- Work on extension integration.
- WIP of the inline view token - Began work on compiled-code caching
This commit is contained in:
1 parent
66c7b349d1
commit
f8e3dbd60f
8 files changed
+105
-11
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user