$cache public property
The cache object or the application component ID of the cache object. The messages data will be cached using this cache object. Note, that to enable caching you have to set $enableCaching to true, otherwise setting this property has no effect. After the MongoDbMessageSource object is created, if you want to change this property, you should only assign it with a cache object. This can also be a configuration array for creating the object. See also:
$cachingDuration
$en