query_cache 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/query_cache.rb +11 -1
- data/lib/query_cache/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 332b824ea25f9644ccd2d442eab4185e1b898c34
|
4
|
+
data.tar.gz: d5186809af202bd6b28133cef6d01ec97993bc1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f244d2889fe415176bbb3f37a50d65bf27c6faf29ed5ab3f7815de2f8421c1cbba396db9a2b748533052114f5cccfee46c0c238ddbf4384f4f03eee1a6b8f2e3
|
7
|
+
data.tar.gz: 324796fd4ce77cdb423e9891a63ccf1daee001e1b2d22356b5972a758a40ff678081b88b7fc6cac72b74c3aeb26e2d39d2dc0ae933b27ed57e09b346b1efe2e0
|
data/lib/query_cache.rb
CHANGED
@@ -10,7 +10,9 @@ require "rack/body_proxy"
|
|
10
10
|
# https://github.com/rails/rails/blob/4-2-stable/activerecord/lib/active_record/query_cache.rb
|
11
11
|
module QueryCache
|
12
12
|
class Middleware
|
13
|
-
|
13
|
+
class << self
|
14
|
+
attr_accessor :base
|
15
|
+
end
|
14
16
|
|
15
17
|
def initialize(app)
|
16
18
|
@app = app
|
@@ -32,8 +34,16 @@ module QueryCache
|
|
32
34
|
restore_query_cache_settings(connection_id, enabled)
|
33
35
|
end
|
34
36
|
|
37
|
+
def self.to_s
|
38
|
+
base ? "#{superclass.name}<#{base.name}>" : name
|
39
|
+
end
|
40
|
+
|
35
41
|
private
|
36
42
|
|
43
|
+
def base
|
44
|
+
self.class.base
|
45
|
+
end
|
46
|
+
|
37
47
|
def restore_query_cache_settings(connection_id, enabled)
|
38
48
|
base.connection_id = connection_id
|
39
49
|
base.connection.clear_query_cache
|
data/lib/query_cache/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Haagen Michaelsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -123,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.4.
|
126
|
+
rubygems_version: 2.4.5.1
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Query cache middleware for custom ActiveRecord base classes.
|
130
130
|
test_files: []
|
131
|
-
has_rdoc:
|