join_cache 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/join_cache.gemspec +1 -1
- data/lib/join_cache.rb +6 -2
- data/test/dummy/Gemfile.lock +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/join_cache.gemspec
CHANGED
data/lib/join_cache.rb
CHANGED
@@ -27,7 +27,7 @@ module JoinCache
|
|
27
27
|
|
28
28
|
# cached_team_ids
|
29
29
|
define_method(cached_ids_name) do
|
30
|
-
Rails.cache.fetch(
|
30
|
+
Rails.cache.fetch(join_cache_key(cached_ids_name)) do
|
31
31
|
send(foreign_key.pluralize.to_sym)
|
32
32
|
end
|
33
33
|
end
|
@@ -68,7 +68,7 @@ module JoinCache
|
|
68
68
|
|
69
69
|
# cached_patient_ids
|
70
70
|
define_method(cached_ids_name) do
|
71
|
-
Rails.cache.fetch(
|
71
|
+
Rails.cache.fetch(join_cache_key(cached_ids_name)) do
|
72
72
|
send(foreign_key.pluralize.to_sym)
|
73
73
|
end
|
74
74
|
end
|
@@ -78,5 +78,9 @@ module JoinCache
|
|
78
78
|
association.klass.where(id: send(cached_ids_name))
|
79
79
|
end
|
80
80
|
end
|
81
|
+
|
82
|
+
def join_cache_key(cached_ids_name)
|
83
|
+
"join_cache/#{cache_key}/#{cached_ids_name}"
|
84
|
+
end
|
81
85
|
end
|
82
86
|
end
|
data/test/dummy/Gemfile.lock
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: join_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -170,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
segments:
|
172
172
|
- 0
|
173
|
-
hash: -
|
173
|
+
hash: -2806823777440786405
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
none: false
|
176
176
|
requirements:
|