Flare by Spatie
  • Features
  • Pricing
  • Docs
  • Blog
  • LOG IN
  • START TRACKING
  • Home
  • Features
  • Pricing
  • Docs
  • Blog
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript
  • General
  • Introduction
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Laravel Octane
  • Errors
  • Adding custom context
  • Customising error grouping
  • Handling errors
  • Linking to errors
  • Reporting errors
  • Sending logs to Flare
  • Performance
  • Introduction
  • Sampling
  • Limits
  • Modify spans and span events
  • Data Collection
  • Application info
  • Cache events
  • Console commands
  • Customise error report
  • Database transactions
  • Dumps
  • Errors when tracing
  • Exception context
  • External http requests
  • Filesystem operations
  • Git information
  • Glows
  • Identifying users
  • Jobs and queues
  • Laravel context
  • Livewire
  • Logs
  • Queries
  • Redis commands
  • Requests
  • Server info
  • Solutions
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Laravel Flare V1
  • Ignition

Cache events

An application can use a cache to store data that is expensive to compute. Flare can collect information about the cache events in your application.

Flare will collect the following information:

  • The cache key
  • The cache store
  • The cache operation (Get, Set, Forget)
  • The cache result (Hit, Miss, Success, Failure)

This functionality is enabled by default, but you can disable it by ignoring the Cache collect in config.php:

use Spatie\FlareClient\Enums\CollectType;

'collects' => FlareConfig::defaultCollects(
    ignore: [CollectType::Cache],
),

It is possible to limit the amount of cache events tracked while collecting data in the case of an error, as such:

'collects' => FlareConfig::defaultCollects(
    extra: [
        CollectType::Cache->value => [
            'max_items_with_errors' => 50,
        ],
    ]
),

It is possible to limit the types of cache operations that are collected:

use Spatie\FlareClient\Enums\CacheOperation;

'collects' => FlareConfig::defaultCollects(
    extra: [
        CollectType::Cache->value => [
            'operations' =>  [CacheOperation::Get]
        ],
    ]
),
Application info Console commands

Monitor your web apps and sites from errors to slowdowns with Flare, the easiest application monitoring platform for Laravel, PHP & Javascript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Blog
  • Changelog
  • Documentation
  • Affiliate program
  • Service status
  • Terms of use
  • DPA
  • Privacy & Cookie Policy
Flare