Skip to content

Query Cache

The query cache is a central piece of the Pinia colada library. It centralizes the caching logic of queries and is used for query invalidation and optimistic updates. It's implemented as a Pinia store. It can be accessed in components setup and other injectable contexts (e.g. Pinia stores, Router navigation guards) with useQueryCache().

vue
<script setup lang="ts">
import { 
useQueryCache
} from '@pinia/colada'
const
queryCache
=
useQueryCache
()
</script>

Released under the MIT License.