You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,9 +50,13 @@ CACHE_UI_PREVIEW_LIMIT=150
50
50
CACHE_UI_SEARCH_SCROLL=20
51
51
```
52
52
53
-
### Custom File Cache Driver (Recommended)
53
+
### Custom File Cache Driver (Only for File Store)
54
54
55
-
For the best experience with file cache, you can use our custom `key-aware-file` driver that allows Cache UI to display real keys instead of file hashes.
55
+
If you are using the `file` cache driver (default in Laravel), you should use our custom `key-aware-file` driver.
56
+
57
+
**Why?** The standard Laravel `file` driver stores keys as hashes, making them unreadable. This custom driver wraps the value to store the real key, allowing you to see and search for them.
58
+
59
+
> **Important**: This is **NOT** needed for Redis or Database drivers, as they support listing keys natively.
56
60
57
61
#### Driver Configuration
58
62
@@ -84,6 +88,7 @@ namespace App\Providers;
84
88
use Abr4xas\CacheUiLaravel\KeyAwareFileStore;
85
89
use Illuminate\Support\Facades\Cache;
86
90
use Illuminate\Support\ServiceProvider;
91
+
use Illuminate\Foundation\Application;
87
92
88
93
class AppServiceProvider extends ServiceProvider
89
94
{
@@ -101,13 +106,11 @@ class AppServiceProvider extends ServiceProvider
101
106
public function boot(): void
102
107
{
103
108
// Register the custom file cache driver
104
-
Cache::extend('key-aware-file', function ($app, $config) {
|**Array**| ⚠️ No | Not supported (doesn't persist) |
168
+
|**Memcached**| ⚠️ No | Not currently supported |
169
+
170
+
> **Note**: The `key-aware-file` driver is **only** needed if you use the `file` cache driver. If you use Redis or Database, you don't need to change your driver configuration.
0 commit comments