Created
April 2, 2019 08:16
-
-
Save DominikAngerer/d35860f9eca99163fe7bdd1bdf236037 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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