hit, miss, delete, write and fail events from Laravel’s Cache layer, making it simple to see which keys are being used and how they’re performing.
Cache List
The Cache page surfaces the top 100 keys used in your application, sorted by the metric you choose. Total calls is shown by default, but you can sort by hits, misses, writes, deletes or failures.Sampling
There are no direct sampling controls for cache events, they are are automatically captured when their parent execution context is sampled.Filtering
Applications that make extensive use of the Cache layer may find it beneficial to filter out low-value events to conserve your event quota.Filter vendor cache keys
For convenience, Nightwatch automatically ignores cache events generated from Laravel’s internal systems and first-party packages. These are low-level events that are not typically of interest to most applications. They include:- Laravel framework internals (e.g. scheduler, queue worker)
- Laravel Vapor job attempts
- Laravel Pulse
- Laravel Reverb
- Laravel Nova
- Laravel Telescope
Nightwatch::defaultVendorCacheKeys().
You can opt in to collecting these using captureDefaultVendorCacheKeys, but be cautioned that this can significantly increase the number of events captured:
AppServiceProvider.php
Filter all cache events
To completely disable the collection of cache events by setting theNIGHTWATCH_IGNORE_CACHE_EVENTS environment variable to true:
Filter using cache keys
Cache events may be filtered by their cache key or key patterns:AppServiceProvider.php
Filter using a callback
You can filter each cache event using a callback for more specific logic:AppServiceProvider.php
Redaction
You can manually redact sensitive information from cache keys withredactCacheEvents: