Skip to content

Commit

Permalink
[core] default cache TTL to null rather than zero, fixes #997
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Jan 7, 2024
1 parent 046f70c commit 15582c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/polyfills.php
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ function stringer($s): string
* If a value is in the cache, return it; otherwise, call the callback
* to generate it and store it in the cache.
*/
function cache_get_or_set(string $key, callable $callback, int $ttl = 0)
function cache_get_or_set(string $key, callable $callback, ?int $ttl = null)
{
global $cache;
$value = $cache->get($key);
Expand Down

0 comments on commit 15582c5

Please sign in to comment.