|
@@ 2213-2219 (lines=7) @@
|
| 2210 |
|
$response->header( "Cache-Control: " . |
| 2211 |
|
"s-maxage={$this->mCdnMaxage}, must-revalidate, max-age=0" ); |
| 2212 |
|
} |
| 2213 |
|
} else { |
| 2214 |
|
# We do want clients to cache if they can, but they *must* check for updates |
| 2215 |
|
# on revisiting the page. |
| 2216 |
|
wfDebug( __METHOD__ . ": private caching; {$this->mLastModified} **", 'private' ); |
| 2217 |
|
$response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); |
| 2218 |
|
$response->header( "Cache-Control: private, must-revalidate, max-age=0" ); |
| 2219 |
|
} |
| 2220 |
|
if ( $this->mLastModified ) { |
| 2221 |
|
$response->header( "Last-Modified: {$this->mLastModified}" ); |
| 2222 |
|
} |
|
@@ 2223-2231 (lines=9) @@
|
| 2220 |
|
if ( $this->mLastModified ) { |
| 2221 |
|
$response->header( "Last-Modified: {$this->mLastModified}" ); |
| 2222 |
|
} |
| 2223 |
|
} else { |
| 2224 |
|
wfDebug( __METHOD__ . ": no caching **", 'private' ); |
| 2225 |
|
|
| 2226 |
|
# In general, the absence of a last modified header should be enough to prevent |
| 2227 |
|
# the client from using its cache. We send a few other things just to make sure. |
| 2228 |
|
$response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); |
| 2229 |
|
$response->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' ); |
| 2230 |
|
$response->header( 'Pragma: no-cache' ); |
| 2231 |
|
} |
| 2232 |
|
} |
| 2233 |
|
|
| 2234 |
|
/** |