Accelerate Cached Query then Invalidate
A 2-step recipe with Prisma. We can help you get access.
Recipe · 2 steps
Accelerate Cached Query then Invalidate
with Prisma
Works with AI assistants
Execute a tagged cached query through Accelerate and then invalidate its cache tags.
- Execute the Prisma query through the Accelerate proxy with a cache strategy that applies the supplied TTL and cache tags.
- Invalidate the cache entries tagged by the query so subsequent reads refetch fresh data from the database.
What you'll need to have ready
- apiKey: Accelerate API key, sent as a Bearer token in the Authorization header.
- apiVersion: Prisma engine API version path segment (e.g. 2024).
- engineHash: Prisma engine version hash path segment for protocol compatibility.
- query: The Prisma query serialized as a GraphQL query string.
- ttl: Cache time-to-live in seconds for the query result.
- cacheTags: Cache tags applied to the result and later invalidated (max 5).
For your developer
Arazzo workflow prisma:query-and-invalidate, 2 operations: executeQuery → invalidateCacheByTags. Specs on APIs.io.