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

Skip to content

[HttpCache][WIP] Use RFC9211 Cache-Status #60078

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

Draft
wants to merge 3 commits into
base: 7.4
Choose a base branch
from

Conversation

franckranaivo
Copy link
Contributor

@franckranaivo franckranaivo commented Mar 28, 2025

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

This PR is intended to answer #58985 by using Cache-Status directives as described here.

  • From now it is still a work in progress. Very basic feature were added in this first commit with a naïve implementation to see if am on the right track.

@carsonbot carsonbot added this to the 7.3 milestone Mar 28, 2025
@franckranaivo franckranaivo marked this pull request as draft March 28, 2025 16:49
@@ -29,6 +29,8 @@ class HeaderBag implements \IteratorAggregate, \Countable, \Stringable
protected array $headers = [];
protected array $cacheControl = [];

Copy link
Contributor

Choose a reason for hiding this comment

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

Blank line can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -127,6 +127,7 @@ public function testInvalidatesOnPostPutDeleteRequests()

$this->assertHttpKernelIsCalled();
$this->assertResponseOk();

Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@fabpot fabpot modified the milestones: 7.3, 7.4 May 26, 2025
@stof
Copy link
Member

stof commented Jun 23, 2025

@franckranaivo do you intend to continue this ?

Btw, it would be great to update the description of the PR to include some usage examples. It makes the review much easier.

@@ -29,6 +29,8 @@ class HeaderBag implements \IteratorAggregate, \Countable, \Stringable
protected array $headers = [];
protected array $cacheControl = [];

protected array $cacheStatus = [];
Copy link
Member

Choose a reason for hiding this comment

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

this array is unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I intended to use this array later in order to separate cache status headers (in the rfc) from cache control headers. It is still a wip, but yes soon it will be used.

@franckranaivo
Copy link
Contributor Author

@franckranaivo do you intend to continue this ?

@stof yes, sorry I was a bit busy these days. I will continue this asap :)

Btw, it would be great to update the description of the PR to include some usage examples. It makes the review much easier.

Sure I will, I will add some more description within the next days

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.

5 participants