Catalyst Cache

catalystbyzoho/agent-skills/skills/catalyst-cache

作者 catalystbyzoho69e5df0514d6091eb7fb399106d1a43298f83b33無授權條款66 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫今天更新

Catalyst Cache — in-memory key-value store with TTL for ephemeral session and temporary data. Trigger on 'Cache', 'cache segment', 'cache key', 'TTL', 'segment.put', 'segment.get', or 'temporary data Catalyst'.

AI 產生的概覽

指導使用 Catalyst Cache 記憶體鍵值儲存,涵蓋 SDK 操作、TTL 限制與已知陷阱。

功能
此技能說明如何使用 Catalyst Cache——一種具備 TTL、用於暫時性工作階段與臨時資料的記憶體鍵值儲存。內容包括取得 segment ID、載入 cache-basics 參考文件以了解 SDK 操作、以 JSON 序列化方式存放僅限字串的值,以及 48 小時 TTL 上限。它也記錄了兩個陷阱:未帶到期參數的 segment.update() 會把 TTL 重設為 48 小時,而 segment.delete() 只是把值設為 null,並不會刪除鍵。
適用情境
當工作涉及 Catalyst Cache 區段、快取鍵或值、TTL 設定、工作階段或臨時資料,或在快取與 Data Store 之間做選擇時使用。排查快取行為異常(例如 TTL 意外變動或刪除後傳回 null)時也適用。
執行需求
需要 Catalyst 環境及其快取 SDK;若可用則使用列出快取區段的 MCP 工具,否則 segment ID 來自主控台或 .catalystrc。不附帶指令碼,僅為說明文件加一份參考文件。

How It Works

  1. Get Segment ID — Use MCP (CatalystbyZoho_List_Cache_Segments) if available; otherwise retrieve it from the console or .catalystrc.
  2. Load references/cache-basics.md — for SDK operations, TTL limits (48 hr max), and the segment.delete() / segment.update() gotchas.
  3. String values only — All cache values are strings. Always JSON.stringify before put and JSON.parse after get.
  4. TTL behavior — TTL is in HOURS (max 48), not seconds. segment.update() called WITHOUT an expiry argument silently resets the key's TTL to the 48-hour maximum (a 1-hour key becomes a 48-hour key). segment.delete() does not remove the key — it sets cache_value to null and the key persists; a later getValue() returns null with HTTP 200 and never throws.

Triggers

Use this skill for: "Cache", "cache segment", "cache key", "cache value", "TTL", "in-memory store", segment.get, segment.put, segment.delete, "session data", "temporary data Catalyst", "cache vs Data Store", or "48-hour cache".

References

ReferenceLoad when the query is about…
references/cache-basics.mdSDK operations (get, put, delete, update), Segment ID, 48hr TTL max, string-only values, segment.delete() null gotcha, segment.update() TTL gotcha

來源與署名

來源:catalystbyzoho/agent-skills位於skills/catalyst-cache提交69e5df0

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架