Get cache entry

cacheEntry(projectReference: String!, key: String!): CacheEntry!

A miss returns found=false.

Requires project.cache.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceString!YesProject UUID or slug.
keyString!YesCache key, 1 to 512 characters.

Response

Returns CacheEntry!. Open the type for its fields and nested types.

FieldTypeDescription
projectIdID!Project that owns the cache.
keyString!Cache key.
foundBoolean!Whether a live entry exists for the key. A miss is a result, not an error.
valueStringStored value, always decompressed; null when found is false.
expiresAtDateTimeTime the entry expires; null for a miss or for an entry written through the legacy no-expiry path (ttl=0).

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query CacheEntry($projectReference: String!, $key: String!) {
  cacheEntry(projectReference: $projectReference, key: $key) {
    projectId
    expiresAt
    found
    key
    value
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "key": "example"
}