Skip to content
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

[HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined #10896

Merged
merged 2 commits into from May 13, 2014

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented May 12, 2014

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets #8232, #10822, #9919
License MIT

From #9919:

"When the cache is stale the validate method forward the request to the backend. A new response will be created with or without TTL configuration. If the TTL was not set then the default one should be set like in the fetch method."

This PR fixes this issue, the tests provided in #9919 pass, and I've tweaked them to avoid the costly sleep calls.

@alquerci
Copy link
Contributor

👍

1 similar comment
@OwlyCode
Copy link
Contributor

👍

@fabpot fabpot merged commit e3983e8 into symfony:2.3 May 13, 2014
fabpot added a commit that referenced this pull request May 13, 2014
… a default "global" TTL is defined (alquerci, fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #8232, #10822, #9919
| License       | MIT

From #9919:

"When the cache is stale the `validate` method `forward` the request to the backend. A new response will be created with or without TTL configuration. If the TTL was not set then the default one should be set like in the `fetch` method."

This PR fixes this issue, the tests provided in #9919 pass, and I've tweaked them to avoid the costly sleep calls.

Commits
-------

e3983e8 [HttpKernel] fixed default TTL not applied under certain conditions
bc42dae Added test when TTL has expired
fabpot added a commit that referenced this pull request May 15, 2014
…sts (jakzal)

This PR was merged into the 2.4 branch.

Discussion
----------

[HttpKernel] Replace sha1 with sha256 in recently added tests

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT

Tests were introduced in #10896 and are broken starting with 2.4, since the hashing algorithm has changed (introduced in #8609).

Commits
-------

255544f [HttpKernel] Replace sha1 with sha256 in recently added tests.
@fabpot fabpot deleted the default-ttl branch May 17, 2014 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants