fetchTimestamp updates a timestamp file if the local copy of a file is out
of date relative to the data source. In practice, the desired definition of
'out of date' differs widely among data sources, sizes, and projects, so
fetchTimestamp is a generic function with a method specific to each
fetchTimestamp method should write a timestamp file, or
not, as required to achieve the desired
make behavior. See
fetchTimestampMethods and fetchTimestampHelpers for assistance in
defining new fetchTimestamp methods. Also consider preferences.yaml and
exceededTimeToLive() for additional options for managing data fetches.
'fetchTimestamp.sciencebase' gets the file timestamp from ScienceBase.
'fetchTimestamp.file' creates a timestamp file once, with file metadata and file contents that both match the timestamp of the viz data file. If the timestamp file already exists, it is only modified if the data file is updated.
'fetchTimestamp.url' checks a URL for a timestamp. The URL headers must include a 'last-modified' field; otherwise, this method breaks and you should write your own for the specific URL in question.
fetchTimestamp.fetcher superclass method catches missing
1 2 3 4 5 6 7 8 9 10 11 12 13
the identifier for a fetch item in viz.yaml
It doesn't matter what a fetchTimestamp method returns. It matters a lot more whether it creates/updates the timestamp file or not.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.