8000 Missing cache data in profiler · Issue #59838 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

Missing cache data in profiler #59838

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

Closed
dcmbrs opened this issue Feb 23, 2025 · 2 comments · Fixed by #59940
Closed

Missing cache data in profiler #59838

dcmbrs opened this issue Feb 23, 2025 · 2 comments · Fixed by #59940

Comments

@dcmbrs
Copy link
Contributor
dcmbrs commented Feb 23, 2025

Symfony version(s) affected

5.4.x

Description

When we stream response (Symfony\Component\HttpFoundation\StreamedResponse) and use cache in streamed response callback, we don't see this cache used in profiler

How to reproduce

Demo run on this project https://github.com/dcmbrs/cache-stream-profiler and follow up readme on master branch

Possible Solution

Fix Data method lateCollect in Symfony\Component\Cache\DataCollector

Additional Context

In general, the problem seems to occur with everything that happens once the 'kernel.response' event has passed.

@rhidja
Copy link
rhidja commented Feb 23, 2025

Image

@dcmbrs
Copy link
Contributor Author
dcmbrs commented Feb 23, 2025

Note : this bug always present in latest symfony version

PR open on 6.4 symfony branch, trying to follow doc to how contribute

fabpot added a commit that referenced this issue Feb 26, 2025
This PR was merged into the 6.4 branch.

Discussion
----------

[Cache] fix cache data collector on late collect

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #59838
| License       | MIT

Commits
-------

4b8bb5c fix cache data collector on late collect
@fabpot fabpot closed this as completed Feb 26, 2025
nicolas-grekas added a commit that referenced this issue Mar 13, 2025
This PR was merged into the 6.4 branch.

Discussion
----------

[Cache] Fix missing cache data in profiler

| Q             | A
| ------------- | ---
| Branch?       |  6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #59838
| License       | MIT

There was a problem with the rebase on PR #59841
I added the fix and a test to check it

Commits
-------

cc505f9 [Cache] fix data collector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
0