Random asset lists not random, unless _nocache

Hi everyone,


I've got a few examples of random asset lists, that have lost their randomness, I think due to caching. Here's one of them - the three advert images on the left of this page: http://www.lakedistrictweatherline.co.uk



If I call that page as: http://www.lakedistrictweatherline.co.uk/_nocache and hit Ctrl F5 a few times, I see the images all changing positions. Lovely. Happy advertisers.



But, if I call the page normally, and hit Ctrl F5 a few times, the images don't budge. Not so good. Unhappy advertisers.



The images are in an asset list, which is nested into a design customisation. I've gone into my cache manager, and set up 'root node specific' customisations for the asset list, and set cache to 'No', but seems to make no difference.



How can I give my random lists their mojo back, and make them random?



Thanks!

Charlie.

Matrix wont be caching that asset listing for you, but you might have a proxy (like Squid) out the front caching the page as a whole. Normally, these are setup to allow _nocache requests to go through to Matrix, but to cache everything else.


If this is the case, you're going to have to disable that proxy if you want random content on the page OR do the random bit in JS by loading all possible content blocks and then picking a few to show at random.

Hi Greg,


Just noticed another odd thing. I've got a similar thing on another page - http://www.exmoor-nationalpark.gov.uk/ hit Ctrl F5 and you should see the 'places of interest' and the 'biodiversity' boxes change content, randomly.



The only difference that I can see between these two examples, is that the Exmoor one has the nested asset lists nested into the page asset. Whereas the Lake District Weatherline one has the asset lists nested into the Design asset.



Could that be why one refreshes and one doesn't? Does Matrix and/or Squid cache the design asset, so the page refreshes but Design asset's don't? In which case would changing the Lake District site so the asset lists get nested into a paint layout and not the design make it work?



Thanks again!

Charlie.

I would use JS for this as Greg mentioned. You are going to have an easier time getting it working and more control as well.

If a nested page in the design seems to be cached by the design, check if the cache=1 attribute of the design area is set. You get complete control over what parts of the design are cached, and can change these settings per customisation too.