|
@@ 2190-2196 (lines=7) @@
|
| 2187 |
|
$response->header( 'Cache-Control: s-maxage=' . $this->mCdnMaxage |
| 2188 |
|
. ', must-revalidate, max-age=0' ); |
| 2189 |
|
} |
| 2190 |
|
} else { |
| 2191 |
|
# We do want clients to cache if they can, but they *must* check for updates |
| 2192 |
|
# on revisiting the page. |
| 2193 |
|
wfDebug( __METHOD__ . ": private caching; {$this->mLastModified} **", 'private' ); |
| 2194 |
|
$response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); |
| 2195 |
|
$response->header( "Cache-Control: private, must-revalidate, max-age=0" ); |
| 2196 |
|
} |
| 2197 |
|
if ( $this->mLastModified ) { |
| 2198 |
|
$response->header( "Last-Modified: {$this->mLastModified}" ); |
| 2199 |
|
} |
|
@@ 2200-2208 (lines=9) @@
|
| 2197 |
|
if ( $this->mLastModified ) { |
| 2198 |
|
$response->header( "Last-Modified: {$this->mLastModified}" ); |
| 2199 |
|
} |
| 2200 |
|
} else { |
| 2201 |
|
wfDebug( __METHOD__ . ": no caching **", 'private' ); |
| 2202 |
|
|
| 2203 |
|
# In general, the absence of a last modified header should be enough to prevent |
| 2204 |
|
# the client from using its cache. We send a few other things just to make sure. |
| 2205 |
|
$response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); |
| 2206 |
|
$response->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' ); |
| 2207 |
|
$response->header( 'Pragma: no-cache' ); |
| 2208 |
|
} |
| 2209 |
|
} |
| 2210 |
|
|
| 2211 |
|
/** |