Skip to content

Commit 7a5a2e3

Browse files
committed
[Dev] Added configurations for cache file path
1 parent 82f31e0 commit 7a5a2e3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

config/repository.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
*/
3030
'enabled' => false,
3131

32+
/*
33+
|--------------------------------------------------------------------------
34+
| Cache path
35+
|--------------------------------------------------------------------------
36+
|
37+
| Path for read/write cache keys file
38+
|
39+
*/
40+
'path' => storage_path('framework/cache/'),
41+
3242
/*
3343
|--------------------------------------------------------------------------
3444
| Cache Minutes

src/Helpers/CacheKeys.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace CodeOfDigital\CacheRepository\Helpers;
44

5+
use Illuminate\Support\Facades\Config;
6+
57
class CacheKeys
68
{
79
protected static string $storeFile = 'repository-cache-keys.json';
@@ -39,7 +41,7 @@ public static function loadKeys(): array
3941

4042
public static function getFileKeys(): string
4143
{
42-
return storage_path('framework/cache/' . self::$storeFile);
44+
return Config::get('repository.cache.path', storage_path('framework/cache/')) . self::$storeFile;
4345
}
4446

4547
public static function storeKeys(): bool|int

0 commit comments

Comments
 (0)