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:
@@ -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(),
|
||||
|
||||
@@ -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/'
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user