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

[WIP][HttpKernel] Add missing ttl configuration into HttpCache::validate() #8232

Closed
wants to merge 1 commit into from

Conversation

alquerci
Copy link
Contributor

@alquerci alquerci commented Jun 9, 2013

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
  • Add unit tests

The TTL configuration was lost after HTTP validation

@fabpot
Copy link
Member

fabpot commented Dec 31, 2013

That's wrong. The validate method only takes care of HTTP validation.

@fabpot fabpot closed this Dec 31, 2013
@alquerci
Copy link
Contributor Author

@fabpot Why the validate method call store method if the response is cacheable. Probably that is not its job.

That it should be into the lookup method after called validate?

The following tests are they correct? link If so lookup at travis

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
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.

None yet

2 participants