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.
- data/VERSION +1 -1
- data/cache_flow.gemspec +1 -1
- data/lib/cache_flow.rb +1 -11
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/cache_flow.gemspec
CHANGED
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
|
-
|
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)
|