Skip to content

Commit

Permalink
Adding model.json cache settings to dispatcher (#937)
Browse files Browse the repository at this point in the history
* * adding model.json cache settings to dispatcher
* bump of required version of spa.project.core

* * adding model.json cache settings to dispatcher
* bump of required version of spa.project.core

Co-authored-by: Bartosz Borowski <pid63525@adobe.com>
  • Loading branch information
blackbyte-pl and Bartosz Borowski authored Jun 13, 2022
1 parent fc3eeea commit ecb4f01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ Include conf.d/variables/custom.vars

# Rewrite index page internally, pass through (PT)
RewriteRule "^(/?)$" "/index.html" [PT]

</IfModule>

# Content Services/Sling Model Exporter: Cache for 5min with background refresh 1h on browser and 12h on CDN to avoid MISS
<LocationMatch "^/content/.*\.model\.json$">
Header set Cache-Control "max-age=300,stale-while-revalidate=3600" "expr=%{REQUEST_STATUS} < 400"
Header set Surrogate-Control "stale-while-revalidate=43200,stale-if-error=43200" "expr=%{REQUEST_STATUS} < 400"
Header set Age 0
</LocationMatch>
</VirtualHost>
2 changes: 1 addition & 1 deletion src/main/archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
#if ( $isSpaProject )
<spa.project.core.version>1.3.10</spa.project.core.version>
<spa.project.core.version>1.3.12</spa.project.core.version>
#end
#if ( $frontendModule == "angular" )
<!--
Expand Down

0 comments on commit ecb4f01

Please sign in to comment.