[yast-commit] <rest-service> master : do not cache background progress result

ref: refs/heads/master commit 91d118a0441ef15037726e24c42b9f62bc8b2cd7 Author: Ladislav Slezak <lslezak@novell.com> Date: Wed Nov 11 16:38:36 2009 +0100 do not cache background progress result cache only the real patches status, not the background progress --- .../patches/app/controllers/patches_controller.rb | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/plugins/patches/app/controllers/patches_controller.rb b/plugins/patches/app/controllers/patches_controller.rb index b8dad76..5552fc1 100644 --- a/plugins/patches/app/controllers/patches_controller.rb +++ b/plugins/patches/app/controllers/patches_controller.rb @@ -51,6 +51,12 @@ class PatchesController < ApplicationController format.xml { render :xml => @patches.to_xml( :root => "patches", :dasherize => false ) } format.json { render :json => @patches.to_json( :root => "patches", :dasherize => false ) } end + + # do not cache the background progress status + # (expire the cache in the next request) + if bgr && @patches.first.class == BackgroundStatus + Rails.cache.write('patches:timestamp', Time.at(0)) + end end # GET /patch_updates/1 -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Ladislav Slezak