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