symfony/symfony — pull request #7164 by bamarni (2013-02-23 13:31:21+00:00)
Title: [HttpCache] better decoupling between HttpCache and Store

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

When trying to implement a custom Store, I realized that currently HttpCache assumes the Store is storing data into files, and returns a custom ```X-Body-File``` header, then it handles the data fetching itself instead of relying on the Store.

For example here https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php#L614 or here https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php#L625.

This patch make the store fetching the response content itself, leaving to HttpCache only the parsing part.

I prefer sending it to the master branch, and I suggest setting the HttpCache method in question (which is private) to protected for maintenance branches.