Situation
Enabling page cache setting as follows:
-settings.yml
prod:
.settings:
cache: on
-cache.yml
enabled: on
with_layout: true
lifetime: 300 # example value
When a page whose page cache has been expired is requested by HEAD method, symfony creates a new page cache which has a property 'headerOnly = true', because symfony always sets this property of the sfWebResponse to true when requested by HEAD method. (see cache/frontend/prod/config/config_factories.yml.php)
After this, symfony will not return the body of that cached page for the subsequent GET request
because the cached sfWebResponse object has a property 'headerOnly = true'.
Proposal
Symfony should create page caches with a property 'headerOnly = false' even if requested by HEAD method.
Reference of the sfWebResponse object should be updated after reading page cache
http://trac.symfony-project.org/ticket/6633