Skip to content

Commit 482ebd5

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: fixes async cache computation example and FQCN
2 parents 8b1e038 + 2ab5def commit 482ebd5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cache.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ In the following example, the value is requested from a controller::
908908
public function index(CacheInterface $asyncCache): Response
909909
{
910910
// pass to the cache the service method that refreshes the item
911-
$cachedValue = $cache->get('my_value', [CacheComputation::class, 'compute'])
911+
$cachedValue = $asyncCache->get('my_value', [CacheComputation::class, 'compute'])
912912

913913
// ...
914914
}
@@ -926,13 +926,13 @@ a message bus to compute values in a worker:
926926
cache:
927927
pools:
928928
async.cache:
929-
early_expiration_message_bus: async_bus
929+
early_expiration_message_bus: messenger.default_bus
930930
931931
messenger:
932932
transports:
933933
async_bus: '%env(MESSENGER_TRANSPORT_DSN)%'
934934
routing:
935-
Symfony\Component\Cache\Messenger\Message\EarlyExpirationMessage: async_bus
935+
'Symfony\Component\Cache\Messenger\EarlyExpirationMessage': async_bus
936936
937937
.. code-block:: xml
938938
@@ -948,12 +948,12 @@ a message bus to compute values in a worker:
948948
>
949949
<framework:config>
950950
<framework:cache>
951-
<framework:pool name="async.cache" early-expiration-message-bus="async_bus"/>
951+
<framework:pool name="async.cache" early-expiration-message-bus="messenger.default_bus"/>
952952
</framework:cache>
953953
954954
<framework:messenger>
955955
<framework:transport name="async_bus">%env(MESSENGER_TRANSPORT_DSN)%</framework:transport>
956-
<framework:routing message-class="Symfony\Component\Cache\Messenger\Message\EarlyExpirationMessage">
956+
<framework:routing message-class="Symfony\Component\Cache\Messenger\EarlyExpirationMessage">
957957
<framework:sender service="async_bus"/>
958958
</framework:routing>
959959
</framework:messenger>
@@ -970,7 +970,7 @@ a message bus to compute values in a worker:
970970
return static function (FrameworkConfig $framework): void {
971971
$framework->cache()
972972
->pool('async.cache')
973-
->earlyExpirationMessageBus('async_bus');
973+
->earlyExpirationMessageBus('messenger.default_bus');
974974
975975
$framework->messenger()
976976
->transport('async_bus')

0 commit comments

Comments
 (0)