We are referring solution given in this link for implementing VaryByCustom caching. But it is not going through this method.
Can anyone suggest on what might be missing for this to work or help on how can this implemented in CMS 12 to work.
I had a look through the blog post and I just wanted to check you have done the following:
If this is all working then I think a good place to start looking is the order of the service registration.
From the first blog you should have added:
To then use the custom implementation of 'IOutputCacheVaryByCustomService' you would need to call the service registration after this:
Does this all look like your code?
You can see the example startup.cs here
Yes followed all these steps as mentioned here.
I believe no content cache will work unless you set the content cache properties in appsettings, see https://docs.developers.optimizely.com/content-management-system/docs/configuring-cms#contentoptions
Yes added this configuration in appsettings.json file. It will not fire the GetVaryByCustomString() method from service.
Do we need to call this method explicitly apart from adding this line [ContentOutputCache(Duration = 86400, VaryByCustom="visitorgroups")] for controller action method?