forked from Cavemanon/cavepaintings
remove CACHE_HTTP - client side page cache causes more problems than it solves
This commit is contained in:
@@ -287,22 +287,6 @@ class BasePage
|
||||
|
||||
switch ($this->mode) {
|
||||
case PageMode::PAGE:
|
||||
if (CACHE_HTTP) {
|
||||
global $user;
|
||||
header("Vary: Cookie, Accept-Encoding");
|
||||
if ($user->is_anonymous() && $_SERVER["REQUEST_METHOD"] == "GET") {
|
||||
header("Cache-control: public, max-age=600");
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 600) . ' GMT');
|
||||
} else {
|
||||
#header("Cache-control: private, max-age=0");
|
||||
header("Cache-control: no-cache");
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() - 600) . ' GMT');
|
||||
}
|
||||
}
|
||||
#else {
|
||||
# header("Cache-control: no-cache");
|
||||
# header('Expires: ' . gmdate('D, d M Y H:i:s', time() - 600) . ' GMT');
|
||||
#}
|
||||
usort($this->blocks, "blockcmp");
|
||||
$this->add_auto_html_headers();
|
||||
$this->render();
|
||||
|
@@ -22,7 +22,6 @@ _d("DATABASE_DSN", null); // string PDO database connection details
|
||||
_d("DATABASE_TIMEOUT", 10000);// int Time to wait for each statement to complete
|
||||
_d("CACHE_DSN", null); // string cache connection details
|
||||
_d("DEBUG", false); // boolean print various debugging details
|
||||
_d("CACHE_HTTP", false); // boolean output explicit HTTP caching headers
|
||||
_d("COOKIE_PREFIX", 'shm'); // string if you run multiple galleries with non-shared logins, give them different prefixes
|
||||
_d("SPEED_HAX", false); // boolean do some questionable things in the name of performance
|
||||
_d("NICE_URLS", false); // boolean force niceurl mode
|
||||
|
Reference in New Issue
Block a user