Skip to content

Commit

Permalink
add HTTP response header hint to cache for 12 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
Conal-Tuohy committed Aug 6, 2018
1 parent 2f30ecb commit 11adea6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xslt/solr-xml-to-json.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@
</xsl:template>

<xsl:template name="response-headers">
<!-- hint to cache for up to 24 hours -->
<c:header name="Cache-Control" value="max-age=43200"/><!-- cache for 12 hours -->
<xsl:if test="$is-search-request">
<!-- pagination headers are only useful for search requests because they produce multiple results -->
<c:header name="Result-Count" value="{$result-count}"/>
Expand Down

0 comments on commit 11adea6

Please sign in to comment.