remove CACHE_HTTP - client side page cache causes more problems than it solves

This commit is contained in:
Shish
2020-02-09 16:25:17 +00:00
parent 3c78b5685e
commit 641fd5a16f
4 changed files with 1 additions and 19 deletions

View File

@@ -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();

View File

@@ -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