Ensure action caching includes GET params

By default the auto-generated action cache keys looks like this:
`views/0.0.0.0:3000/api/order_cycles/1/properties`

With this change the cache keys now look like this:
`views/0.0.0.0:3000/api/order_cycles/1/properties?distributor=3`
This commit is contained in:
Matt-Yorkley
2020-04-22 19:40:24 +02:00
parent ea1ec1a1c6
commit a25a75bbe8

View File

@@ -5,7 +5,9 @@ module Api
skip_authorization_check
caches_action :taxons, :properties, expires_in: CacheService::FILTERS_EXPIRY
caches_action :taxons, :properties,
expires_in: CacheService::FILTERS_EXPIRY,
cache_path: proc { |controller| controller.request.url }
def products
products = ProductsRenderer.new(