databasedotcom_additions 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ module Databasedotcom
7
7
  attr_accessor :session_id
8
8
  attr_accessor :server_url
9
9
 
10
- attr_accessor :query_result_cache_enabled
10
+ attr_accessor :cache_mgr
11
11
  attr_accessor :login_failed_user_message
12
12
 
13
13
  alias_method :query_orig, :query
@@ -87,11 +87,11 @@ module Databasedotcom
87
87
 
88
88
  start_time = Time.now
89
89
 
90
- if query_result_cache_enabled
90
+ if cache_mgr
91
91
  cache_key = "#{self.username}:#{soql}"
92
92
  if cache[cache_key]
93
93
  puts "cache get - #{cache_key}"
94
- return cache[cache_key]
94
+ return cache_mgr.get(cache_key)
95
95
  end
96
96
  end
97
97
 
@@ -106,9 +106,9 @@ module Databasedotcom
106
106
  resp['records'] = resp['records'].concat(next_resp['records'])
107
107
  end
108
108
 
109
- if query_result_cache_enabled
109
+ if cache_mgr
110
110
  puts "cache put - #{cache_key}"
111
- cache[cache_key] = resp
111
+ cache_mgr.set(cache_key, resp.to_json)
112
112
  end
113
113
 
114
114
  elapsed_time = Time.now - start_time
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: databasedotcom_additions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: