Changeset 7976
- Timestamp:
- 03/19/08 17:35:53 (5 months ago)
- Files:
-
- branches/1.1/lib/filter/sfCacheFilter.class.php (modified) (1 diff)
- branches/1.1/lib/view/sfViewCacheManager.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/filter/sfCacheFilter.class.php
r7770 r7976 112 112 { 113 113 // set some headers that deals with cache 114 $lifetime = $this->cacheManager->getClientLifeTime($uri, 'page'); 115 $this->response->setHttpHeader('Last-Modified', $this->response->getDate(time()), false); 116 $this->response->setHttpHeader('Expires', $this->response->getDate(time() + $lifetime), false); 117 $this->response->addCacheControlHttpHeader('max-age', $lifetime); 114 if ($lifetime = $this->cacheManager->getClientLifeTime($uri, 'page')) 115 { 116 $this->response->setHttpHeader('Last-Modified', $this->response->getDate(time()), false); 117 $this->response->setHttpHeader('Expires', $this->response->getDate(time() + $lifetime), false); 118 $this->response->addCacheControlHttpHeader('max-age', $lifetime); 119 } 118 120 119 121 // set Vary headers branches/1.1/lib/view/sfViewCacheManager.class.php
r7787 r7976 242 242 'withLayout' => isset($options['withLayout']) ? $options['withLayout'] : false, 243 243 'lifeTime' => $options['lifeTime'], 244 'clientLifeTime' => isset($options['clientLifeTime']) && $options['clientLifeTime']? $options['clientLifeTime'] : $options['lifeTime'],244 'clientLifeTime' => isset($options['clientLifeTime']) ? $options['clientLifeTime'] : $options['lifeTime'], 245 245 'contextual' => isset($options['contextual']) ? $options['contextual'] : false, 246 246 'vary' => isset($options['vary']) ? $options['vary'] : array(),