I created a first custom rendering for SXA with variant as described in the docs with a repository that inherits from
VariantsRepository and it seems to work fine (we created one variant and that worked as expected).
I had to create another rendering that was rather similar - it belonged in the same feature, even in the same controller. So I created a new action method and placed a new GetModel function in my repository. Created the rendering in Sitecore, added a variant and all seemed fine.
But.. when I go to a page that has rendering B and then to a page with rendering A they seem to be interacting. Same thing happens the other way round. The first visited rendering seems to affect the second one as if caching is involved.
- I checked all caching settings. There are none.
- I added a breakpoint in both methods in my controller and both are called.
What could be causing this?