diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-05-19 23:04:25 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-05-20 09:51:06 +0200 |
commit | 3e0d8df0364bfb9da5d36e714e3de1c56f02dcd4 (patch) | |
tree | 7867fdb51c5c000061222d62a97ff226b948e350 /lib/private/App/AppStore/Fetcher/Fetcher.php | |
parent | e4c9acd4ed9e095777212a741dbbe278aabc26ec (diff) | |
download | nextcloud-server-3e0d8df0364bfb9da5d36e714e3de1c56f02dcd4.tar.gz nextcloud-server-3e0d8df0364bfb9da5d36e714e3de1c56f02dcd4.zip |
Cache appstore requests for 60 instead of 5 minutes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/App/AppStore/Fetcher/Fetcher.php')
-rw-r--r-- | lib/private/App/AppStore/Fetcher/Fetcher.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php index 8f2fb0a7084..bb39637891f 100644 --- a/lib/private/App/AppStore/Fetcher/Fetcher.php +++ b/lib/private/App/AppStore/Fetcher/Fetcher.php @@ -41,7 +41,7 @@ use OCP\IConfig; use OCP\ILogger; abstract class Fetcher { - public const INVALIDATE_AFTER_SECONDS = 300; + public const INVALIDATE_AFTER_SECONDS = 3600; /** @var IAppData */ protected $appData; @@ -153,7 +153,7 @@ abstract class Fetcher { // No caching when the version has been updated if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) { - // If the timestamp is older than 300 seconds request the files new + // If the timestamp is older than 3600 seconds request the files new if ((int)$jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) { return $jsonBlob['data']; } |