Skip to content

Instantly share code, notes, and snippets.

@DominikAngerer
Created April 2, 2019 08:16
Show Gist options
  • Save DominikAngerer/d35860f9eca99163fe7bdd1bdf236037 to your computer and use it in GitHub Desktop.
Save DominikAngerer/d35860f9eca99163fe7bdd1bdf236037 to your computer and use it in GitHub Desktop.
<template>
<section class="util__container">
<h1>Cache Cleared</h1>
<br>
<p>Old Cache Version: {{oldCacheVersion}}</p>
<p>New Cache Version: {{newCacheVersion}}</p>
</section>
</template>
<script>
export default {
data() {
return {
oldCacheVersion: '',
newCacheVersion: ''
}
},
asyncData (context) {
let oldCacheVersion = context.store.state.cacheVersion
context.app.$storyapi.flushCache()
let newCacheVersion = context.app.$storyapi.cacheVersion
context.store.commit('setCacheVersion', newCacheVersion)
return {
oldCacheVersion,
newCacheVersion
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment