-- Optionaler Cache fuer SelectLine-API-Antworten (TTL ueber API_CACHE_TTL_MINUTES).
CREATE TABLE IF NOT EXISTS api_cache (
    cache_key  CHAR(64) NOT NULL PRIMARY KEY,   -- sha256 des Suchschluessels
    payload    MEDIUMTEXT NOT NULL,             -- JSON
    expires_at DATETIME NOT NULL,
    INDEX idx_cache_expires (expires_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
