Fix cache directory paths for production deployment

- Change FileCache CACHE_PATH from relative to absolute path
- Change FileCacheCleaner cache folder to absolute path
- Resolves read-only file system issue in production containers
- Cache now uses writable /var/www/html/storage/cache location
This commit is contained in:
2025-08-12 18:37:24 +02:00
parent 02e890a2ca
commit 66f7efdcfc
6 changed files with 465 additions and 28 deletions

View File

@@ -14,7 +14,7 @@ use App\Framework\Filesystem\Storage;
final readonly class FileCache implements CacheDriver, Scannable
{
private const string CACHE_PATH = __DIR__ . '/../storage/cache';
private const string CACHE_PATH = '/var/www/html/storage/cache';
public function __construct(
private Storage $fileSystem = new FileStorage(),

View File

@@ -11,7 +11,7 @@ final readonly class FileCacheCleaner
{
public function __construct(
private Storage $fileSystem = new FileStorage(),
private string $cacheFolder = __DIR__.'/storage/cache/'
private string $cacheFolder = '/var/www/html/storage/cache/'
) {
}