Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.11.3] - UNRELEASED

### Added


### Changed / Improved


### Fixed
- add missing cache tags for category and product - @gibkigonzo (#4173)

## [1.11.2] - 2020.03.10

### Added
Expand Down
3 changes: 2 additions & 1 deletion src/themes/default/pages/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ export default {
return this.getCategoryProductsTotal === 0
}
},
async asyncData ({ store, route }) { // this is for SSR purposes to prefetch data - and it's always executed before parent component methods
async asyncData ({ store, route, context }) { // this is for SSR purposes to prefetch data - and it's always executed before parent component methods
if (context) context.output.cacheTags.add('category')
await composeInitialPageState(store, route)
},
async beforeRouteEnter (to, from, next) {
Expand Down
3 changes: 2 additions & 1 deletion src/themes/default/pages/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ export default {
async mounted () {
await this.$store.dispatch('recently-viewed/addItem', this.getCurrentProduct)
},
async asyncData ({ store, route }) {
async asyncData ({ store, route, context }) {
if (context) context.output.cacheTags.add('product')
const product = await store.dispatch('product/loadProduct', { parentSku: route.params.parentSku, childSku: route && route.params && route.params.childSku ? route.params.childSku : null })
const loadBreadcrumbsPromise = store.dispatch('product/loadProductBreadcrumbs', { product })
if (isServer) await loadBreadcrumbsPromise
Expand Down