We are looking to enable caching in Sitecore 6 on a specific page, however, this page has an image set based on a random value - and as such, we actually need to cache each individually rendered page so that we can keep this "random" image.
Any suggestions? I figured that we would need to use sublayout params, but can not see how I can set this in the code behind to influence the caching behaviour.
Any way of directly manipulating the cache entry?
Regards,
Andy
Create an outer sublayout defined in Sitecore, e.g. MyComponent. In the code for that, statically bind an inner sublayout, eg. MyComponentInner and in the C# of the former, set the VaryByParms value to be a random number.