]> source.dussan.org Git - nextcloud-server.git/commitdiff
feat(dav): increase default calendar subscription refresh rate to one day dav-webcal-default-refresh-rate 49396/head
authorThomas Citharel <tcit@tcit.fr>
Wed, 20 Nov 2024 09:05:13 +0000 (10:05 +0100)
committerThomas Citharel <tcit@tcit.fr>
Wed, 20 Nov 2024 09:07:29 +0000 (10:07 +0100)
With the performance benefits from #43541 it makes sense

Reference https://github.com/nextcloud/server/issues/46171#issuecomment-2487910923

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/dav/lib/BackgroundJob/RefreshWebcalJob.php
apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php

index f9d6de9db59f2ddd3555384c6f671dcd261cdc36..e96735ca50b939760bb68043a2e325cf23b3d767 100644 (file)
@@ -41,8 +41,8 @@ class RefreshWebcalJob extends Job {
 
                $this->fixSubscriptionRowTyping($subscription);
 
-               // if no refresh rate was configured, just refresh once a week
-               $defaultRefreshRate = $this->config->getAppValue('dav', 'calendarSubscriptionRefreshRate', 'P1W');
+               // if no refresh rate was configured, just refresh once a day
+               $defaultRefreshRate = $this->config->getAppValue('dav', 'calendarSubscriptionRefreshRate', 'P1D');
                $refreshRate = $subscription[RefreshWebcalService::REFRESH_RATE] ?? $defaultRefreshRate;
 
                $subscriptionId = $subscription['id'];
index f97626a6a7335bb2ac2d5ffa3e1792672650645a..2b11223210e90e19dacd08ee51a1cf999edf6c74 100644 (file)
@@ -78,7 +78,7 @@ class RefreshWebcalJobTest extends TestCase {
 
                $this->config->expects($this->once())
                        ->method('getAppValue')
-                       ->with('dav', 'calendarSubscriptionRefreshRate', 'P1W')
+                       ->with('dav', 'calendarSubscriptionRefreshRate', 'P1D')
                        ->willReturn('P1W');
 
                $this->timeFactory->method('getTime')