From 668ef51cef21163a6393be184f89098cdc7c24a4 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 11 Apr 2012 16:15:58 -0400 Subject: [PATCH] make sure cache gets cleared --- lib/flowerbox/rack.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/flowerbox/rack.rb b/lib/flowerbox/rack.rb index 50e0f5c..1f37fba 100644 --- a/lib/flowerbox/rack.rb +++ b/lib/flowerbox/rack.rb @@ -12,7 +12,10 @@ module Flowerbox def _call(env) if sprockets_file = env['PATH_INFO'][%r{/__F__(.*)$}, 1] - sprockets.call(env.merge('QUERY_STRING' => 'body=1', 'PATH_INFO' => sprockets_file)) + result = sprockets.call(env.merge('QUERY_STRING' => 'body=1', 'PATH_INFO' => sprockets_file)) + result[1]['Cache-Control'] = 'max-age: 0' + + result else [ 200, { 'Content-type' => 'text/html' }, [ runner.template ] ] end