Skip to content

Commit 45305d7

Browse files
committed
apply suggestion
1 parent 5bd38b5 commit 45305d7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

user_guide_src/source/libraries/caching.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ Class Reference
145145
calculation.
146146

147147
When a callable is provided, it will only be executed on a cache miss,
148-
after the callback has been invoked. The callable may optionally accept
149-
the computed value as its first argument:
148+
after the callback has been invoked. The callable always receives the
149+
computed value as its first argument:
150150

151151
.. literalinclude:: caching/015.php
152152

user_guide_src/source/libraries/caching/015.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
// Simple dynamic TTL
4-
$cache->remember('key', static fn () => 60, static fn () => fetchData());
4+
$cache->remember('key', static fn ($value) => 60, static fn () => fetchData());
55

66
// Value-aware TTL
77
$cache->remember(

0 commit comments

Comments
 (0)