diff --git a/Web/Presenters/OpenVKPresenter.php b/Web/Presenters/OpenVKPresenter.php index 7ad33585..410f4d5d 100755 --- a/Web/Presenters/OpenVKPresenter.php +++ b/Web/Presenters/OpenVKPresenter.php @@ -205,6 +205,7 @@ abstract class OpenVKPresenter extends SimplePresenter $this->template->isTimezoned = Session::i()->get("_timezoneOffset"); $userValidated = 0; + $cacheTime = OPENVK_ROOT_CONF["openvk"]["preferences"]["nginxCacheTime"] ?? 0; if(!is_null($user)) { $this->user = (object) []; $this->user->raw = $user; @@ -263,6 +264,7 @@ abstract class OpenVKPresenter extends SimplePresenter } $userValidated = 1; + $cacheTime = 0; # Force no cache if ($this->user->identity->onlineStatus() == 0) { $this->user->identity->setOnline(time()); $this->user->identity->save(); @@ -274,6 +276,7 @@ abstract class OpenVKPresenter extends SimplePresenter } header("X-OpenVK-User-Validated: $userValidated"); + header("X-Accel-Expires: $cacheTime"); setlocale(LC_TIME, ...(explode(";", tr("__locale")))); parent::onStartup(); diff --git a/openvk-example.yml b/openvk-example.yml index 50f519d1..0e8e8c46 100644 --- a/openvk-example.yml +++ b/openvk-example.yml @@ -6,6 +6,7 @@ openvk: preferences: femaleGenderPriority: true + nginxCacheTime: null uploads: disableLargeUploads: false mode: "basic"