We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d96740 commit 636edadCopy full SHA for 636edad
src/components/Item.vue
@@ -27,12 +27,20 @@
27
</template>
28
29
<script>
30
+import { timeAgo } from '../filters'
31
+
32
export default {
33
name: 'news-item',
34
props: ['item'],
35
// https://github.com/vuejs/vue/blob/next/packages/vue-server-renderer/README.md#component-caching
36
serverCacheKey: props => {
- return `${props.item.id}::${props.item.__lastUpdated}`
37
+ return `${
38
+ props.item.id
39
+ }::${
40
+ props.item.__lastUpdated
41
42
+ timeAgo(props.item.time)
43
+ }`
44
}
45
46
</script>
0 commit comments