diff options
| author | mo khan <mo@mokhan.ca> | 2013-12-28 19:40:27 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-12-28 19:40:27 -0700 |
| commit | bcfbcdb4ab82fe4b474bd357a4fe34313eb32a2b (patch) | |
| tree | 857e8c64637d6a5ebae22d8b00451901580eeaf9 /app | |
| parent | 3397f3b311f6ab4182619b180b690e8991dbcbcc (diff) | |
cache the sitemap.
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/sitemap_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/sitemap_controller.rb b/app/controllers/sitemap_controller.rb index e529c2d6..3b207a1b 100644 --- a/app/controllers/sitemap_controller.rb +++ b/app/controllers/sitemap_controller.rb @@ -6,6 +6,8 @@ class SitemapController < ApplicationController @tutorials = Tutorial.all @base_url = "https://#{request.host_with_port}" headers['Content-Type'] = 'application/xml' + expires_in(1.hour) + fresh_when(@creations) if @creations.any? respond_to do |format| format.xml end |
