lib/nitro/caching/output.rb in nitro-0.24.0 vs lib/nitro/caching/output.rb in nitro-0.25.0

- old
+ new

@@ -42,11 +42,11 @@ private def output_cache_path(path) filename = ((path.empty? || path == '/') ? 'index.html' : path.dup) # filename.gsub!(/\/$/, '') - filename << 'index.html' unless (filename.split('/').last || filename).include? '.' + filename << '/index.html' unless (filename.split('/').last || filename).include? '.' return output_cache_root + '/' + filename end end @@ -64,12 +64,13 @@ FileUtils.rm_rf("#{context.dispatcher.public_root}/#{name}") rescue Object # gmosx: is this the right thing to do? end end + alias_method :delete_output, :expire_output def caching_allowed? - !@request.post? + not (@request.post? or @request.uri =~ /\?/) end end end