lib/billy/cache.rb in puffing-billy-0.10.1 vs lib/billy/cache.rb in puffing-billy-0.11.0

- old
+ new

@@ -67,10 +67,14 @@ def reset @cache = {} end def key(method, orig_url, body, log_key = false) - ignore_params = Billy.config.ignore_params.include?(format_url(orig_url, true)) + if Billy.config.use_ignore_params + ignore_params = Billy.config.ignore_params.include?(format_url(orig_url, true)) + else + ignore_params = !Billy.config.allow_params.include?(format_url(orig_url, true)) + end merge_cached_response_key = _merge_cached_response_key(orig_url) url = Addressable::URI.parse(format_url(orig_url, ignore_params)) key = if merge_cached_response_key method + '_' + Digest::SHA1.hexdigest(scope.to_s + merge_cached_response_key) else