Asset listing last modified date

G'day,


A Matrix asset listing seems designed to report a Last-Modified date (in the HTTP headers) and also the %asset_updated% date, as being the last updated date of the most recent asset being listed. Is this correct, and is it documented in the manuals somewhere?



On our site we have an asset listing of a Data Source Record Set (http://www.antarctica.gov.au/webcams/aurora), which seems not to use any date from the data source records but instead uses the last updated date of the most recently updated child of the asset listing page. In our case this is a standard page that is not the root node of the listing, nor is it listed by the asset listing.



This behaviour seems quite strange - has anyone else observed something like this? Is this a bug?



I'm interested in this because one of the main complaints or 'confusions' with our site is to do with caching of asset listings. On the particular listing I'm referring to, even though the data changes every 30 minutes, the page reports a Last-Modified date of a month ago, and the Google Chrome web browser refuses to show the latest version of the page (works ok in other browsers).



(We're using Matrix 4.6.1)



Thanks,



Warwick

I can't comment on your specific site because I have no idea how it is implemented, but in general:


The last modified date that is sent in the headers (the one that is used with a proxy) is the most recent updated date out of all assets loaded during the page generation. That can include all sorts of nested content, assets being listed, menu items etc. If the asset is not loaded, it is not included in this calculation because the core code has no idea that it was ever used. Some asset listings (and all those listing shadow assets) will not load any assets to produce their list.



Note that this is different to the last updated date that you can print via a keyword. That value is specific to an asset and, for an asset listing, will only ever change if you modify the settings of the listing itself.

Hi Greg,


Is there a way to print the last modified date on a page? Thanks.



Robin

We have some asset listings that list data records that change every 5 minutes. In order to get the asset listing to show a constantly updating 'last modified' date. I've come up with the following two alternative methods:

  1. Schedule a 'Clear Matrix Cache' cron job to run every 15 minutes to clear the cache on the XML Data Source page that the asset listing uses as its root node. Then have a trigger that reacts to the clear matrix cache event and sets the date-updated (of the XML Data Source asset) to the date/time the trigger was fired.


  2. Set a future status on the XML Data Source asset of 'up for review'. Have a trigger that detects the change of status on this asset, sets it back to live, sets the date updated to the date/time of the trigger and then sets a new future status for the next time the cron manager is run, so the process can repeat indefinitely.



    I'm posting these methods in case anyone has comments on how to do it better. It'd be ideal if asset listings had a 'Maximum age' field that could be set so that the listing would report a last-modified date of, say, never more than 5 minutes in the past. Does anyone else think this would be useful?



    Cheers,



    Warwick