Development

#6715 (symfony creates unexpected page cache when requested by HEAD method.)

You must first sign up to be able to contribute.

Ticket #6715 (closed defect: fixed)

Opened 8 months ago

Last modified 4 months ago

symfony creates unexpected page cache when requested by HEAD method.

Reported by: GOTTi Assigned to: Kris.Wallsmith
Priority: major Milestone: 1.3.0 alpha2
Component: cache Version: 1.2.7
Keywords: cache HEAD request sfWebResponse Cc:
Qualification: Unreviewed

Description

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.

Related

Reference of the sfWebResponse object should be updated after reading page cache http://trac.symfony-project.org/ticket/6633

Change History

07/26/09 16:22:16 changed by Kris.Wallsmith

  • owner changed from fabien to Kris.Wallsmith.
  • milestone set to 1.2.9.

09/13/09 23:46:07 changed by FabianLange

  • milestone deleted.

kris did you plan on working on this for 1.2.9? I was about to release it, so I unset the milestone.

10/12/09 01:28:42 changed by Kris.Wallsmith

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to 1.3.0 alpha2.

This has been addressed in the 1.3 branch.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.