Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpCache] Add a waiting trace when finding the cache locked #60498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented May 21, 2025

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

This adds a new waiting trace that will be recorded by the HttpCache when the cache had to wait for another, concurrent request to the same resource to finish first.

The information can be used for profiling - a high rate of waiting requests means there is a lot of concurrency, so that it might be beneficial to either speed up request processing or consider using stale-while-revalidate.

@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025

protected function createStore(): Store
{
return new Store(sys_get_temp_dir() . '/http_cache');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return new Store(sys_get_temp_dir() . '/http_cache');
return new Store(sys_get_temp_dir().'/http_cache');

@fabpot fabpot force-pushed the cache-trace-wait branch from 6134f8a to 79d8097 Compare May 30, 2025 06:41
@fabpot
Copy link
Member

fabpot commented May 30, 2025

Thank you @mpdude.

@fabpot fabpot merged commit 1152edf into symfony:7.4 May 30, 2025
10 of 11 checks passed
@mpdude mpdude deleted the cache-trace-wait branch May 30, 2025 08:02
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.

4 participants