We have configured Tridion sites 9 deployers,upgraded DD4T web application with DD4T.Provider.Tridion9.CIL able to retrieve the content successfully. Configured Active Mq, updated deployer and content services with the caching configuration. I was able to verify cache invalidation logs in the deployer when I publish the page.
The issue is with the DD4T web application cache invalidation. I am trying to configure the web application to connect to Active Mq. Imported all the required packages but cache agent is unable to subscribe to JMS provider. Below is the code snippet on Application_start()
var cacheAgent = container.Resolve<ICacheAgent>();
var defaultCacheAgent = cacheAgent as DefaultCacheAgent;
if (defaultCacheAgent is DefaultCacheAgent)
{
messageProvider.Start();
defaultCacheAgent.Subscribe(messageProvider);
}
On debugging found cacheAgent
is an object of DD4T.Providers.DXAModelservice.Caching.DxaCacheAgent and unable to cast to DefaultCacheAgent
, thus the condition is not satisfied and JMS is not subscribed.
Any leads to resolve this issue is appreciated.