join_cache 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/join_cache.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "join_cache"
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kevin Bongart"]
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("#{cache_key}/#{cached_ids_name}") do
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("#{cache_key}/#{cached_ids_name}") do
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../../join_cache
3
3
  specs:
4
- join_cache (0.2.0)
4
+ join_cache (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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.1
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: -1521667804423956077
173
+ hash: -2806823777440786405
174
174
  required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  none: false
176
176
  requirements: