This question is not an implementation specific question of the grails plugin, but more of a question illustrated using grails.
Grails a plugin for writing cache related headers (http://grails.org/plugin/cache-headers) and they show an example that looks like
class ContentController
def show = {
cache shared:true, validFor: 3600 // 1hr on content
render(....)
}
}
Since the grails request to get here would look something like http://myapp/content/show, would a browser even try to cache this since it’s not a specific resource with a filename (e.g. it’s not show.gsp, even though that is what is being used to generate the html)?
What’s the purpose of specifying a cache time on dynamic content that won’t be cached by the browser (assuming I’m understanding how the browser will cache it based on my statement above)? When might this be useful? Might this be useful in an ajax environment where the user is not typing the full url but rather we’re dynamically updating part of a page?
Browser caches URL, not a filename (because HTTP is not a filesystem). I thinks it’s the answer for both questions, right?
See: