class ZuoraConnect::Api::V1::AppInstanceController
def cache_bust
def cache_bust if defined?(Redis.current) @appinstance.fetch_connect_data #Fetch data and set in database if kms key is used @appinstance.cache_app_instance(force_cache: true) #Update cache in redis Redis.current.del("AppInstance:#{@appinstance.id}") @appinstance.cache_app_instance(force_cache: true) #Update cache in redis #TODO: Could be a chance another thread cache back to old value, but will eventually cache will get consitent, move to nolonger needing redis cache respond_to do |format| format.json {render json: {}, status: :ok} end else respond_to do |format| format.json {render json: {}, status: :bad_request} end end end