active_facets 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84aaee9f8be13da53c3dbc1000012eeae6dd2837
4
- data.tar.gz: b65c1280f5c33d77ecde385901c51f88d591a881
3
+ metadata.gz: 5aa090a021c8255f714c05164e36e620bcc60875
4
+ data.tar.gz: a154884c639697db5d542eea86b8f86b004afe00
5
5
  SHA512:
6
- metadata.gz: 5b060f4a3173117eaa143d14c786794748035b1a4e1e992080f64fd4b8e393635a6122a9ed0e017471e058aa528fb52ae80a51166655f641bb4d401b3ee5a829
7
- data.tar.gz: f9588af0a223e4c19ba75954afe424e2e1bc0b0bb8a3ec3777288f3c89d710daa470fb8b32f304aca35ca8691362a3c23e760349faf988cc7056b320845f20a0
6
+ metadata.gz: 8999ac9a9ae2f4e87b0af147ef11d5833a5cf9c5ebdade6c2397e32a207bfb73c12ec144ed7034b46503586237477589a4fe1cd875f708f67a08856ffbaf8127
7
+ data.tar.gz: b6ec730155650f823aba1d305cc5b45be06aec2805cd87f34f027da2faf0c8d55ab3555788967f478fb7c82cacb21798600b35fd305779229de2d668d24cc2f9
@@ -20,6 +20,7 @@ module ActiveFacets
20
20
  :field_overrides_key,
21
21
  :version_key,
22
22
  :filters_key,
23
+ :cache_bypass_key,
23
24
  :cache_force_key,
24
25
  :filters_force_key,
25
26
  :strict_lookups,
@@ -37,6 +38,7 @@ module ActiveFacets
37
38
  self.field_overrides_key = :field_overrides
38
39
  self.version_key = :version
39
40
  self.filters_key = :filters
41
+ self.cache_bypass_key = :cache_bypass
40
42
  self.cache_force_key = :cache_force
41
43
  self.filters_force_key = :filters_force
42
44
 
@@ -46,7 +46,7 @@ module ActiveFacets
46
46
  # @param facade [Facade] to inspect
47
47
  # @return [Boolean]
48
48
  def self.cacheable?(facade)
49
- ActiveFacets.cache_enabled
49
+ ActiveFacets.cache_enabled && facade.opts[ActiveFacets.cache_bypass_key].blank?
50
50
  end
51
51
  end
52
52
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveFacets
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
@@ -4,6 +4,7 @@ default:
4
4
  field_overrides_key: field_overrides
5
5
  version_key: version
6
6
  filters_key: filters
7
+ cache_bypass_key: cache_bypass
7
8
  cache_force_key: cache_force
8
9
  filters_force_key: cache_force
9
10
  strict_lookups: false
@@ -23,6 +23,9 @@ ActiveFacets.configure do |config|
23
23
  # The symbol which acts as the context key that designates filters for serialization. :filters by default.
24
24
  # config.filters_key = @env_config['filters_key'].to_sym
25
25
 
26
+ # The symbol which acts as the context key that designates force for cache. :cache_bypass by default.
27
+ # config.cache_bypass_key = @env_config['cache_bypass_key'].to_sym
28
+
26
29
  # The symbol which acts as the context key that designates force for cache. :cache_force by default.
27
30
  # config.cache_force_key = @env_config['cache_force_key'].to_sym
28
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_facets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honest Company