Commit 5a75ef7f authored by Evan You's avatar Evan You

tweaks

parent 1d70c472
......@@ -33,14 +33,8 @@ export default {
name: 'news-item',
props: ['item'],
// https://github.com/vuejs/vue/blob/next/packages/vue-server-renderer/README.md#component-caching
serverCacheKey: props => {
return `${
props.item.id
}::${
props.item.__lastUpdated
}::${
timeAgo(props.item.time)
}`
serverCacheKey: ({ item: { id, __lastUpdated, time }}) => {
return `${id}::${__lastUpdated}::${timeAgo(time)}`
}
}
</script>
......
......@@ -8,7 +8,9 @@
<script>
export default {
props: ['show']
name: 'spinner',
props: ['show'],
serverCacheKey: props => props.show
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment