nexcess/magento-turpentine — pull request #700 by b3k (2014-12-09 12:47:49+00:00)
Title: Fix grace-period to work properly.

Current grace-period configuration doesn't really work. There was no beresp.grace in vcl_fetch, and req.grace should be moved to vcl_recv. In current version of Turpentine we can use only one feature of grace-period - delivering old content as long as fetching new content is in progress. Possibility to serve old content when backend is seek is possible only when BackendPooling is used - which can be introduced when we merge this pull request https://github.com/nexcess/magento-turpentine/pull/632 - which is really good job.

It can be easily test:

1. Set in Admin configuration "Grace period" for 1200s
2. Set in Admin configuration "Default Page TTL" to for example 60s
3. Clear varnish cache and upload new configuration to Varnish
4. Insert into your index.php at beggining some sleep display ```sleep(10)```
5. Call any page that will be cached (example www.clean-magento.local/index.php/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html)
6. Wait at least 60 seconds to make cache stale
7. Call ```curl -I www.clean-magento.local/index.php/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html``` in two seperate console
8. When one request will wait 10 sec, then second will get old content using grace-period