laserlemon-cache_flow 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/cache_flow.gemspec +1 -1
  3. data/lib/cache_flow.rb +1 -11
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/cache_flow.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cache_flow}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["laserlemon"]
data/lib/cache_flow.rb CHANGED
@@ -91,17 +91,7 @@ module LaserLemon
91
91
  def serialization_cache_key(extension, options)
92
92
  query = options.except(:cache, :skip_instruct).reject{|k,v| v.nil? }.to_query
93
93
  key = ["#{cache_key}.#{extension}", query].delete_if(&:blank?).join('?')
94
- if cache_key_limit && (key.size > cache_key_limit)
95
- "#{cache_key}.#{extension}?#{hashed_serialization_query(query)}"
96
- else
97
- key
98
- end
99
- end
100
-
101
- def cache_key_limit
102
- case Rails.cache.class.name.demodulize.underscore.to_sym
103
- when :mem_cache_store then 250
104
- end
94
+ key.size <= 250 ? key : "#{cache_key}.#{extension}?#{hashed_serialization_query(query)}"
105
95
  end
106
96
 
107
97
  def hashed_serialization_query(query)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: laserlemon-cache_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - laserlemon