Changeset 7977
- Timestamp:
- 03/19/08 17:37:04 (2 years ago)
- Files:
-
- branches/1.0/lib/filter/sfCacheFilter.class.php (modified) (1 diff)
- branches/1.0/lib/view/sfViewCacheManager.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/filter/sfCacheFilter.class.php
r7769 r7977 119 119 { 120 120 // set some headers that deals with cache 121 $lifetime = $this->cacheManager->getClientLifeTime($uri, 'page'); 122 $this->response->setHttpHeader('Last-Modified', $this->response->getDate(time()), false); 123 $this->response->setHttpHeader('Expires', $this->response->getDate(time() + $lifetime), false); 124 $this->response->addCacheControlHttpHeader('max-age', $lifetime); 121 if ($lifetime = $this->cacheManager->getClientLifeTime($uri, 'page')) 122 { 123 $this->response->setHttpHeader('Last-Modified', $this->response->getDate(time()), false); 124 $this->response->setHttpHeader('Expires', $this->response->getDate(time() + $lifetime), false); 125 $this->response->addCacheControlHttpHeader('max-age', $lifetime); 126 } 125 127 126 128 // set Vary headers branches/1.0/lib/view/sfViewCacheManager.class.php
r4017 r7977 170 170 'withLayout' => isset($options['withLayout']) ? $options['withLayout'] : false, 171 171 'lifeTime' => $options['lifeTime'], 172 'clientLifeTime' => isset($options['clientLifeTime']) && $options['clientLifeTime']? $options['clientLifeTime'] : $options['lifeTime'],172 'clientLifeTime' => isset($options['clientLifeTime']) ? $options['clientLifeTime'] : $options['lifeTime'], 173 173 'contextual' => isset($options['contextual']) ? $options['contextual'] : false, 174 174 'vary' => isset($options['vary']) ? $options['vary'] : array(),

