@@ -895,7 +895,7 @@ In the following example, the value is requested from a controller::
895
895
public function index(CacheInterface $asyncCache): Response
896
896
{
897
897
// pass to the cache the service method that refreshes the item
898
- $cachedValue = $cache ->get('my_value', [CacheComputation::class, 'compute'])
898
+ $cachedValue = $asyncCache ->get('my_value', [CacheComputation::class, 'compute'])
899
899
900
900
// ...
901
901
}
@@ -913,13 +913,13 @@ a message bus to compute values in a worker:
913
913
cache :
914
914
pools :
915
915
async.cache :
916
- early_expiration_message_bus : async_bus
916
+ early_expiration_message_bus : messenger.default_bus
917
917
918
918
messenger :
919
919
transports :
920
920
async_bus : ' %env(MESSENGER_TRANSPORT_DSN)%'
921
921
routing :
922
- Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage : async_bus
922
+ ' Symfony\Component\Cache\Messenger\EarlyExpirationMessage ' : async_bus
923
923
924
924
.. code-block :: xml
925
925
@@ -935,12 +935,12 @@ a message bus to compute values in a worker:
935
935
>
936
936
<framework : config >
937
937
<framework : cache >
938
- <framework : pool name =" async.cache" early-expiration-message-bus =" async_bus " />
938
+ <framework : pool name =" async.cache" early-expiration-message-bus =" messenger.default_bus " />
939
939
</framework : cache >
940
940
941
941
<framework : messenger >
942
942
<framework : transport name =" async_bus" >%env(MESSENGER_TRANSPORT_DSN)%</framework : transport >
943
- <framework : routing message-class =" Symfony\Component\Cache\Messenger\Message\ EarlyExpirationMessage" >
943
+ <framework : routing message-class =" Symfony\Component\Cache\Messenger\EarlyExpirationMessage" >
944
944
<framework : sender service =" async_bus" />
945
945
</framework : routing >
946
946
</framework : messenger >
@@ -957,7 +957,7 @@ a message bus to compute values in a worker:
957
957
return static function (FrameworkConfig $framework): void {
958
958
$framework->cache()
959
959
->pool('async.cache')
960
- ->earlyExpirationMessageBus('async_bus ');
960
+ ->earlyExpirationMessageBus('messenger.default_bus ');
961
961
962
962
$framework->messenger()
963
963
->transport('async_bus')
0 commit comments