Releases: shiftcommerce/shift_commerce-rails
Upgrade to Rails 6.0
Bug/Update the cache-control header to include public directive (#77)
With rails latest upgrade(5.2), cache-control header is having private as its default parameter if you don't specify.
And also when we have surrogate keys set, it means we want it to be cached by Fastly, which requires the header set to public. This PR addresses the issue
Shift Cache method to support cache versioning
#74 - This PR implements cache versioning for shift_cache methods, and also updates the bundle api request fields, as the missing updated_at timestamp is causing the cache key failure.
Cleanup/remove deprecate body content field
#73 - The field, "body_content" on static_page resource has been deprecated. Proposed alternative to this is: A meta attribute "static_content"
Bugfix: Fix default bundle page title field used
Related ticket: https://github.com/matalan-retail-limited/matalan-rails-site/issues/90
Update the default title for a bundle page to use the bundle name
, previously it was trying to use title
which would always render nil
.
Feature/Menu cache key version
#72:
Related ticket: https://github.com/matalan-retail-limited/matalan-rails-site/issues/55
This PR introduces the ability to append the cache version string into the actual cache key for menus or in general for the resources which calls the method shift_cache_key
.
Before: shift_cache_key(resource, banner_reference)
After: shift_cache_key(resource, cache_version, banner_reference)
Same with the menus_cache method too:
Before: menus_cache(reference, banner_reference , dependent_reference, options)
After: `menus_cache(reference, cache_version, banner_reference, dependent_reference, options)
Method to check static page rendering
#71 - PR adds a method to see if a particular static page can be rendered or not.
Update cache key to reference class.
#63 - PR updates the generation of cache keys to use the class, previously every key was hard coded with a prefix of FlexCommerce::Menu
.
Add a `preview_mode` helper
#61 This PR adds a preview_mode_enabled?
helper, which can be used to see if preview=true
is set in the query url.
Prevent static page preview reading from cache
#55 Prevent static page preview: When user trying to preview a static page, data is supposed to be read from API. But instead, it is getting read from cache. This PR handles the situation by returning yield if the preview param is set to true.