Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance fixes + IndexedDb Replacement #2112

Merged
merged 5 commits into from
Dec 23, 2018
Merged

Performance fixes + IndexedDb Replacement #2112

merged 5 commits into from
Dec 23, 2018

Conversation

pkarw
Copy link
Collaborator

@pkarw pkarw commented Dec 23, 2018

Related issues

#2021, #2107

Short description and why it's useful

@NataliaTepluhina please update the docs + Upgrade notes please:

Starting from Vue Storefront 1.7 we've changed the Caching strategy + Offline ready features:

  • by default, the ElasticSearch Queries are executed using GET method - and therefore are cached by Service Worker (c - set it to POST for the previous behavior and if You're using graphql),
  • by default products and queries cache is set in the LocalStorage with a quota set to 4MB (config.server.elasticCacheQuota). If the storage quota is set, the cache purging is executed each 30s using LRU algorithm. Local Storage is limited to 5MB in most browsers
  • we've added config.server. disableLocalStorageQueriesCache which is set to true by default. When this option is on then we're not storing the ElasticSearch results in local cache - this is due to the fact that results are by default cached in Service Worker cache anyway.

Backward compatibility - to reverse to the 1.0-1.6 behavior please set:

  • set config.server. disableLocalStorageQueriesCache = false,
  • set config.elasticsearch.queryMethod = POST
  • set config.localForage.defaultDrivers.elasticCache = INDEXEDDB

@patzick seems like this also closes #2021 :) Sorry! :)

Screenshots of visual changes before/after (if there are any)

(if you made any changes in the UI layer please provide before/after screenshots)

Screenshot of passed e2e tests (if you are using our standard setup as a backend)

(run yarn test:e2e and paste the results. If you are not using our standard backend setup or demo.vuestorefront.io you can ommit this step)

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

Contribution and currently important rules acceptance

@pkarw pkarw merged commit f0d515b into vuestorefront:develop Dec 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant