mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user