Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/private/App/AppStore/Fetcher/Fetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ public function get($allowUnstable = false): array {
if (is_array($jsonBlob)) {
// No caching when the version has been updated
if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) {
// If the timestamp is older than 3600 seconds request the files new
$invalidateAfterSeconds = self::INVALIDATE_AFTER_SECONDS;
// If the timestamp is old, request the files new
$invalidateAfterSeconds = static::INVALIDATE_AFTER_SECONDS;

if ($allowUnstable) {
$invalidateAfterSeconds = self::INVALIDATE_AFTER_SECONDS_UNSTABLE;
Expand Down
12 changes: 6 additions & 6 deletions tests/lib/App/AppStore/Fetcher/FetcherBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ public function testGetWithAlreadyExistingFileAndOutdatedTimestamp(): void {
->expects($this->exactly(2))
->method('getTime')
->willReturnOnConsecutiveCalls(
4801,
1502
90001,
90002,
);
$client = $this->createMock(IClient::class);
$this->clientService
Expand Down Expand Up @@ -474,8 +474,8 @@ public function testGetMatchingETag(): void {
->expects($this->exactly(2))
->method('getTime')
->willReturnOnConsecutiveCalls(
4801,
4802
90001,
90002,
);
$client = $this->createMock(IClient::class);
$this->clientService
Expand Down Expand Up @@ -557,8 +557,8 @@ public function testGetNoMatchingETag(): void {
->expects($this->exactly(2))
->method('getTime')
->willReturnOnConsecutiveCalls(
4801,
4802,
90001,
90002,
);
$client = $this->createMock(IClient::class);
$this->clientService
Expand Down
Loading