@@ -907,7 +907,7 @@ In the following example, the value is requested from a controller::
907
907
public function index(CacheInterface $asyncCache): Response
908
908
{
909
909
// pass to the cache the service method that refreshes the item
910
- $cachedValue = $cache ->get('my_value', [CacheComputation::class, 'compute'])
910
+ $cachedValue = $asyncCache ->get('my_value', [CacheComputation::class, 'compute'])
911
911
912
912
// ...
913
913
}
@@ -925,13 +925,13 @@ a message bus to compute values in a worker:
925
925
cache :
926
926
pools :
927
927
async.cache :
928
- early_expiration_message_bus : async_bus
928
+ early_expiration_message_bus : messenger.default_bus
929
929
930
930
messenger :
931
931
transports :
932
932
async_bus : ' %env(MESSENGER_TRANSPORT_DSN)%'
933
933
routing :
934
- Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage : async_bus
934
+ ' Symfony\Component\Cache\Messenger\EarlyExpirationMessage ' : async_bus
935
935
936
936
.. code-block :: xml
937
937
@@ -947,12 +947,12 @@ a message bus to compute values in a worker:
947
947
>
948
948
<framework : config >
949
949
<framework : cache >
950
- <framework : pool name =" async.cache" early-expiration-message-bus =" async_bus " />
950
+ <framework : pool name =" async.cache" early-expiration-message-bus =" messenger.default_bus " />
951
951
</framework : cache >
952
952
953
953
<framework : messenger >
954
954
<framework : transport name =" async_bus" >%env(MESSENGER_TRANSPORT_DSN)%</framework : transport >
955
- <framework : routing message-class =" Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage" >
955
+ <framework : routing message-class =" Symfony\Component\Cache\Messenger\EarlyExpirationMessage" >
956
956
<framework : sender service =" async_bus" />
957
957
</framework : routing >
958
958
</framework : messenger >
@@ -969,7 +969,7 @@ a message bus to compute values in a worker:
969
969
return static function (FrameworkConfig $framework): void {
970
970
$framework->cache()
971
971
->pool('async.cache')
972
- ->earlyExpirationMessageBus('async_bus ');
972
+ ->earlyExpirationMessageBus('messenger.default_bus ');
973
973
974
974
$framework->messenger()
975
975
->transport('async_bus')
0 commit comments