Skip to content

Conversation

@yitznewton
Copy link
Contributor

@yitznewton yitznewton commented Nov 13, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues none
License MIT

I did not find any issues relating to this change.

Currently, CacheDataCollector does not increment any counter on calls to either CacheItemPoolInterface::saveDeferred() or CacheItemPoolInterface::commit().

With this PR, we continue to ignore saveDeferred(), but now treat each call to commit() as one write, regardless of the success or failure of the call, similar to the current behavior with save().

I added a test for the unchanged behavior on saveDeferred() to make that behavior explicit.

@nicolas-grekas nicolas-grekas modified the milestones: 7.4, 6.4 Nov 13, 2025
@nicolas-grekas nicolas-grekas changed the base branch from 7.4 to 6.4 November 13, 2025 17:23
@nicolas-grekas nicolas-grekas force-pushed the cache_data_collector_commit branch from 4bf7788 to 77cfbdf Compare November 13, 2025 17:24
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I've squashed and rebased for 6.4)

@yitznewton yitznewton changed the title [Cache] Recognize commit events as writes in CacheDataCollector [Cache] Recognize saveDeferred events as writes in CacheDataCollector Nov 13, 2025
@nicolas-grekas
Copy link
Member

Thank you @yitznewton.

@nicolas-grekas nicolas-grekas merged commit 711c969 into symfony:6.4 Nov 14, 2025
11 checks passed
@yitznewton yitznewton deleted the cache_data_collector_commit branch November 14, 2025 14:23
This was referenced Nov 16, 2025
This was referenced Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants