@@ -920,7 +920,7 @@ In the following example, the value is requested from a controller::
920
920
public function index(CacheInterface $asyncCache): Response
921
921
{
922
922
// pass to the cache the service method that refreshes the item
923
- $cachedValue = $cache ->get('my_value', [CacheComputation::class, 'compute'])
923
+ $cachedValue = $asyncCache ->get('my_value', [CacheComputation::class, 'compute'])
924
924
925
925
// ...
926
926
}
@@ -938,13 +938,13 @@ a message bus to compute values in a worker:
938
938
cache :
939
939
pools :
940
940
async.cache :
941
- early_expiration_message_bus : async_bus
941
+ early_expiration_message_bus : messenger.default_bus
942
942
943
943
messenger :
944
944
transports :
945
945
async_bus : ' %env(MESSENGER_TRANSPORT_DSN)%'
946
946
routing :
947
- Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage : async_bus
947
+ ' Symfony\Component\Cache\Messenger\EarlyExpirationMessage ' : async_bus
948
948
949
949
.. code-block :: xml
950
950
@@ -960,12 +960,12 @@ a message bus to compute values in a worker:
960
960
>
961
961
<framework : config >
962
962
<framework : cache >
963
- <framework : pool name =" async.cache" early-expiration-message-bus =" async_bus " />
963
+ <framework : pool name =" async.cache" early-expiration-message-bus =" messenger.default_bus " />
964
964
</framework : cache >
965
965
966
966
<framework : messenger >
967
967
<framework : transport name =" async_bus" >%env(MESSENGER_TRANSPORT_DSN)%</framework : transport >
968
- <framework : routing message-class =" Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage" >
968
+ <framework : routing message-class =" Symfony\Component\Cache\Messenger\EarlyExpirationMessage" >
969
969
<framework : sender service =" async_bus" />
970
970
</framework : routing >
971
971
</framework : messenger >
@@ -982,7 +982,7 @@ a message bus to compute values in a worker:
982
982
return static function (FrameworkConfig $framework): void {
983
983
$framework->cache()
984
984
->pool('async.cache')
985
- ->earlyExpirationMessageBus('async_bus ');
985
+ ->earlyExpirationMessageBus('messenger.default_bus ');
986
986
987
987
$framework->messenger()
988
988
->transport('async_bus')
0 commit comments