Skip to content

Commit

Permalink
Corrected the TTL values used in ApcStorageCacheStoreAndRetrieveTestC…
Browse files Browse the repository at this point in the history
…ase::testStoreDelayRetrieveMultipleCacheItems(); added a comment to remember why those TTL values are used
  • Loading branch information
avpaderno committed Feb 19, 2025
1 parent a136ac9 commit 2853a09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/apc_storage_cache.test
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,11 @@ class ApcStorageCacheStoreAndRetrieveTestCase extends ApcStorageCacheBaseTestCas
foreach ($this->storageData() as $id => $data) {
$cid = "store_retrieve_cache_item_$id";

if ($this->assertCacheItemSaved($bin, $cid, $data['value'], $data['ttl'])) {
$max_ttl = max($max_ttl, $data['ttl']);
// The TTL values returned by
// ApcStorageCacheStoreAndRetrieveTestCase::storageData() are increased
// by two seconds to make all the stored values temporary.
if ($this->assertCacheItemSaved($bin, $cid, $data['value'], $data['ttl']+2)) {
$max_ttl = max($max_ttl, $data['ttl']+2);
$stored[] = $cid;
}
}
Expand Down

0 comments on commit 2853a09

Please sign in to comment.