Skip to content

Custom Invalidator does not trigger with background re-cache #15025

Description

@Hoko2021

Bug description

When enabling background re-cache in a full-measure configuration, the Custom Invalidator Class does not fire, which is needed for marking the correct files for invalidation according to what we have configured in the Invalidator.

Also, I do not know if it is also intended for static:clear to also re-cache. If possible can we have a command that just invalidates the cache rather than clears it? We are wanting to configure a deployment setup where on deploy the cache is marked as invalid so that running the static warm command re-caches the files to save on resources.

How to reproduce

  1. Enable Full Measure Caching and register a custom Invalidator class.
  2. Add a condition where on save of an entry, it invalidates another URL.
  3. Enable background re-cache
  4. Save an entry.
  5. Check the relevant files have been invalidated.

Logs

Environment

Environment
Laravel Version: 12.62.0
PHP Version: 8.3.30
Composer Version: -
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en
 
Cache
Config: CACHED
Events: CACHED
Routes: CACHED
Views: CACHED
 
Drivers
Broadcasting: log
Cache: memcached
Database: mysql
Logs: stack / single
Mail: log
Queue: database
Session: file
 
Storage
public/storage: NOT LINKED
 
Statamic
Addons: 4
License Key: Not set
Sites: 5
Stache Watcher: Disabled
Static Caching: full
Version: 6.24.2 PRO
 
Statamic Addons
aerni/font-awesome: 4.0.1
statamic/eloquent-driver: 5.6.3
statamic/importer: 2.1.0
statamic/seo-pro: 7.7.0
 
Statamic Eloquent Driver
Addon Settings: eloquent
Asset Containers: eloquent
Assets: eloquent
Blueprints: eloquent
Collection Trees: eloquent
Collections: eloquent
Entries: eloquent
Fieldsets: eloquent
Form Submissions: eloquent
Forms: eloquent
Global Sets: eloquent
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: eloquent
Revisions: eloquent
Sites: eloquent
Taxonomies: eloquent
Terms: eloquent
Tokens: eloquent

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions