@@ -908,7 +908,7 @@ In the following example, the value is requested from a controller::
908
908
public function index(CacheInterface $asyncCache): Response
909
909
{
910
910
// 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'])
912
912
913
913
// ...
914
914
}
@@ -926,13 +926,13 @@ a message bus to compute values in a worker:
926
926
cache :
927
927
pools :
928
928
async.cache :
929
- early_expiration_message_bus : async_bus
929
+ early_expiration_message_bus : messenger.default_bus
930
930
931
931
messenger :
932
932
transports :
933
933
async_bus : ' %env(MESSENGER_TRANSPORT_DSN)%'
934
934
routing :
935
- Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage : async_bus
935
+ ' Symfony\Component\Cache\Messenger\EarlyExpirationMessage ' : async_bus
936
936
937
937
.. code-block :: xml
938
938
@@ -948,12 +948,12 @@ a message bus to compute values in a worker:
948
948
>
949
949
<framework : config >
950
950
<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 " />
952
952
</framework : cache >
953
953
954
954
<framework : messenger >
955
955
<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" >
957
957
<framework : sender service =" async_bus" />
958
958
</framework : routing >
959
959
</framework : messenger >
@@ -970,7 +970,7 @@ a message bus to compute values in a worker:
970
970
return static function (FrameworkConfig $framework): void {
971
971
$framework->cache()
972
972
->pool('async.cache')
973
- ->earlyExpirationMessageBus('async_bus ');
973
+ ->earlyExpirationMessageBus('messenger.default_bus ');
974
974
975
975
$framework->messenger()
976
976
->transport('async_bus')
0 commit comments