All blocks

AI

AI response cache

Model responses cached by a key the application derives from the request, with a TTL capped by maxTtl, hit counts and a purge of expired entries; only the service role reads and writes it.

DocsModes:managed
terminal
npx better-supabase sql add ai-cache
better-supabase.config.ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  sql: {
    modules: {
      // Modes: "managed". The default is "managed".
      "ai-cache": { mode: "managed" },
    },
  },
});