Am fetching using resources.GetRemote to get both JSON and also images. The resources are cache by setting file cache on `getresource’.
Wonder if there is a way maxAge on resources by their filetype. I would like JSON have maxAge: 6h wherease other resources to be cached with maxAge : -1
{{ with resources.GetRemote "https://archive.org/advancedsearch.php?q=collection%3AServantsOfKnowledge+(language%3Aori+OR+language%3A%22Oriya%22)&fl%5B%5D=collection&fl%5B%5D=addeddate&fl%5B%5D=description&fl%5B%5D=identifier&fl%5B%5D=title&fl%5B%5D=description&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=20&page=1&output=json" }}
{{ with . | unmarshal }}
{{ with .response.docs }}
{{ warnf "%v" .}}
{{ end }}
{{end}}
{{end}}
The objective is not to send too many requests to API service. We would like to get fetch the JSON to check if any new resources are added, if so get the resource content and resource image thumbnail.