Skip to content

Commit

Permalink
fix(ContentQuery): generate cache key based on props (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed May 30, 2022
1 parent 71c5ad6 commit 4bc07dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/components/ContentQuery.ts
@@ -1,3 +1,4 @@
import { hash } from 'ohash'
import { PropType, toRefs, defineComponent, h, useSlots } from 'vue'
import type { ParsedContent, QueryBuilder, SortParams } from '../types'
import { computed, useAsyncData, queryContent } from '#imports'
Expand Down Expand Up @@ -98,7 +99,7 @@ export default defineComponent({
const isPartial = computed(() => path.value.includes('/_'))

const { data, refresh } = await useAsyncData<ParsedContent | ParsedContent[]>(
`content-doc-${path.value}`,
`content-query-${hash(props)}`,
() => {
let queryBuilder: QueryBuilder

Expand Down

0 comments on commit 4bc07dc

Please sign in to comment.