---
title: RELKIT_CACHE_TTL_POLICY
description: "Cache TTL is not valid."
pagination: false
search:
  keywords: [RELKIT_CACHE_TTL_POLICY]
sidebar:
  icon: triangle-alert
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

**Cache TTL is not valid.**

## What happened

A cache TTL is not a positive integer, is above the configured maximum, or `defaultTtlMs` is larger than `maxTtlMs`.

## What to do

Use a positive whole number of milliseconds for `ttlMs` that is not above `maxTtlMs`, or raise `maxTtlMs` in the cache definition.

Reported by `relkit/cache`, `relkit/diagnostics`.

See [all error codes](/docs/errors).
