Skip to content

Commit

Permalink
Added normal page expiration headers and use BAN instead of PURGE
Browse files Browse the repository at this point in the history
  • Loading branch information
bfcapell authored and Jon de Andres committed Oct 9, 2012
1 parent b561ced commit ae916f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ubiquo_design/app/controllers/pages_controller.rb
Expand Up @@ -2,6 +2,7 @@ class PagesController < PublicController

# Renders a Page using its associated template, displaying its blocks and widgets
def show
expires_in 120.seconds, :public => true
response.headers['X-VARNISH-TTL'] = '120'
@page = uhook_load_page
render_page @page
Expand Down
2 changes: 1 addition & 1 deletion ubiquo_design/app/models/page.rb
Expand Up @@ -162,7 +162,7 @@ def varnish_request(url)
puts "PURGING #{url}"
begin
http = Net::HTTP.new(VARNISH_SERVER)
http.send_request('PURGE', url)
http.send_request('BAN', url)
rescue
''
end
Expand Down

0 comments on commit ae916f6

Please sign in to comment.