Hi all,
We reuse "master" asset listings on our site by nesting them in as many as 100 pages (using the dynamic parameters option).
If we set the Refresh Cache for one of these asset listings will it refresh the cache for all 100 instances of the asset listing?
If we have 30 master asset listings would it be a good idea to set a Refresh Cache for all of them? What are the disadvantages of that? I assume I'd have to make sure they all fired at different times.
Thanks,
Steve
Once an asset is nested inside another one, the top level asset gets control of the cache. So clearing the cache on the asset listing that is nested will not clear the cache for those 100 pages it is nested into. You actually need to clear the cache for the asset listing AND all 100 pages.
There is no automated way of doing this unless all 100 pages happen to be under the same root node. In that case, clear the cache for the asset listing and the root node + children.
Thanks for the very speedy reply Greg,
But…
We dont cache our standard pages at all.
When we nest as asset listing into a standard page and then need to clear the cache for that page we do it by clearing the cache of the asset listing - not the page.
But what you're saying is that we need to refresh the cache for both - even though the page is not cached?
Why is it that when we clear the cache manually we only have to clear the cache for the asset listing but when we clear it automatically using "refresh cache" we have to apply it to both?
Thanks,
Steve
If the Standard Pages are not cached, then you do not need to clear them. You can then just clear the Asset Listing. If you clear the cache on the asset listing, it will clear all of its representations (i.e. the cache for all 100 nested locations). Each one will then be rebuilt when the page containing the asset listing is next displayed.
If you want to manually refresh the cache, you need to refresh the cache on the Standard Page nested the asset listing, so that the asset listing caches itself as a nested asset with the appropriate dynamic parameter. Just refreshing the asset listing would only create a cache entry for the listing in its default configuration.
Ah ok, standard pages are not cached. Then yes, clearing the asset listing will clear the 100 pages as well.
To answer the next bit, it is important to know that the asset listing would have a different cache for each of those 100 URLs it is nested on. It does this because the URL can contain query string vars and is also used to determine other URLs within the page. So if you have secure.example.com and www.example.com, you dont want URLs on www.example.com pointing to secure.example.com just because the first time the listing was cached was on the www URL.
So to refresh the cache, you actually need to hit the 100 pages that are nesting the asset listing. The refresh cache trigger only knows about the URLs for the asset listing itself, which does not include any of those 100 pages.
Thanks for all that, Ive read through those responses but I'm not sure I entirely understand.
Is this statement correct:
If I have a page that is loading very slowly because it nests a complex asset listing that uses dynamic parameters, I CANNOT use "refresh cache" functionality to stop some poor bugger every 4 hours having to wait 30 seconds for the page to come down. The page has to be accessed for the cache to refresh so unless I come up with an automated way to do that the user will take the re-cache hit.
Thanks again,
Steve
Correct. You will need to refresh the Standard Page so that the asset listing can cache itself with the appropriate dynamic parameters it has by virtue of being nested.