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

EnvironmentLaravel Version: 12.62.0PHP Version: 8.3.30Composer Version: -Environment: localDebug Mode: ENABLEDMaintenance Mode: OFFTimezone: UTCLocale: enCacheConfig: CACHEDEvents: CACHEDRoutes: CACHEDViews: CACHEDDriversBroadcasting: logCache: memcachedDatabase: mysqlLogs: stack / singleMail: logQueue: databaseSession: fileStoragepublic/storage: NOT LINKEDStatamicAddons: 4License Key: Not setSites: 5Stache Watcher: DisabledStatic Caching: fullVersion: 6.24.2 PROStatamic Addonsaerni/font-awesome: 4.0.1statamic/eloquent-driver: 5.6.3statamic/importer: 2.1.0statamic/seo-pro: 7.7.0Statamic Eloquent DriverAddon Settings: eloquentAsset Containers: eloquentAssets: eloquentBlueprints: eloquentCollection Trees: eloquentCollections: eloquentEntries: eloquentFieldsets: eloquentForm Submissions: eloquentForms: eloquentGlobal Sets: eloquentGlobal Variables: eloquentNavigation Trees: eloquentNavigations: eloquentRevisions: eloquentSites: eloquentTaxonomies: eloquentTerms: eloquentTokens: eloquent

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions