From ed70672110848a968fff3bdfc48aa2a20b673885 Mon Sep 17 00:00:00 2001 From: Mark Turner Date: Sat, 23 Mar 2013 22:54:58 -0700 Subject: [PATCH] Remove the OpenStack API cache busting. Not sure why this was ever here, and I cannot find a reason to continuously bust the Nova request caching in the wsgi request handler. It does not help performance, and makes attempts at ANY caching of responses to a Fog request annoying. --- lib/fog/openstack/compute.rb | 2 +- lib/fog/openstack/identity.rb | 2 -- lib/fog/openstack/image.rb | 2 -- lib/fog/openstack/network.rb | 2 -- lib/fog/openstack/volume.rb | 2 -- lib/fog/rackspace/compute.rb | 1 - 6 files changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/fog/openstack/compute.rb b/lib/fog/openstack/compute.rb index 1cd5a709d..c93ba6eaa 100644 --- a/lib/fog/openstack/compute.rb +++ b/lib/fog/openstack/compute.rb @@ -338,7 +338,7 @@ module Fog }.merge!(params[:headers] || {}), :host => @host, :path => "#{@path}/#{@tenant_id}/#{params[:path]}", - :query => params[:query] || ('ignore_awful_caching' << Time.now.to_i.to_s) + :query => params[:query] })) rescue Excon::Errors::Unauthorized => error if error.response.body != 'Bad username or password' # token expiration diff --git a/lib/fog/openstack/identity.rb b/lib/fog/openstack/identity.rb index 97205dbf7..4f8e5065f 100644 --- a/lib/fog/openstack/identity.rb +++ b/lib/fog/openstack/identity.rb @@ -230,8 +230,6 @@ module Fog }.merge!(params[:headers] || {}), :host => @host, :path => "#{@path}/#{params[:path]}"#, - # Causes errors for some requests like tenants?limit=1 - # :query => ('ignore_awful_caching' << Time.now.to_i.to_s) })) rescue Excon::Errors::Unauthorized => error raise if retried diff --git a/lib/fog/openstack/image.rb b/lib/fog/openstack/image.rb index 74eec7f07..77d8c2176 100644 --- a/lib/fog/openstack/image.rb +++ b/lib/fog/openstack/image.rb @@ -148,8 +148,6 @@ module Fog }.merge!(params[:headers] || {}), :host => @host, :path => "#{@path}/#{params[:path]}"#, - # Causes errors for some requests like tenants?limit=1 - # :query => ('ignore_awful_caching' << Time.now.to_i.to_s) })) rescue Excon::Errors::Unauthorized => error if error.response.body != 'Bad username or password' # token expiration diff --git a/lib/fog/openstack/network.rb b/lib/fog/openstack/network.rb index 71ce5ef04..b48d53dd5 100644 --- a/lib/fog/openstack/network.rb +++ b/lib/fog/openstack/network.rb @@ -168,8 +168,6 @@ module Fog }.merge!(params[:headers] || {}), :host => @host, :path => "#{@path}/#{params[:path]}"#, - # Causes errors for some requests like tenants?limit=1 - # :query => ('ignore_awful_caching' << Time.now.to_i.to_s) })) rescue Excon::Errors::Unauthorized => error if error.response.body != 'Bad username or password' # token expiration diff --git a/lib/fog/openstack/volume.rb b/lib/fog/openstack/volume.rb index 1c5017dbf..ece6dba20 100644 --- a/lib/fog/openstack/volume.rb +++ b/lib/fog/openstack/volume.rb @@ -150,8 +150,6 @@ module Fog }.merge!(params[:headers] || {}), :host => @host, :path => "#{@path}/#{params[:path]}"#, - # Causes errors for some requests like tenants?limit=1 - # :query => ('ignore_awful_caching' << Time.now.to_i.to_s) })) rescue Excon::Errors::Unauthorized => error if error.response.body != 'Bad username or password' # token expiration diff --git a/lib/fog/rackspace/compute.rb b/lib/fog/rackspace/compute.rb index 8621ea460..9f1410432 100644 --- a/lib/fog/rackspace/compute.rb +++ b/lib/fog/rackspace/compute.rb @@ -210,7 +210,6 @@ module Fog }.merge!(params[:headers] || {}), :host => endpoint_uri.host, :path => "#{endpoint_uri.path}/#{params[:path]}", - :query => ('ignore_awful_caching' << Time.now.to_i.to_s) })) rescue Excon::Errors::Unauthorized => error if error.response.body != 'Bad username or password' # token expiration