catalyst-cache

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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
    segment.update()
    resets TTL to the new value, not adds to existing.
    segment.delete()
    returns
    null
    (not an error) if the key is missing.
  1. 获取Segment ID — 如果可用,请使用MCP(
    CatalystbyZoho_List_Cache_Segments
    );否则从控制台或
    .catalystrc
    文件中获取。
  2. 加载
    references/cache-basics.md
    — 了解SDK操作、TTL限制(最长48小时)以及
    segment.delete()
    /
    segment.update()
    的注意事项。
  3. 仅支持字符串值 — 所有缓存值均为字符串。执行
    put
    操作前务必使用
    JSON.stringify
    ,执行
    get
    操作后使用
    JSON.parse
    解析。
  4. TTL行为
    segment.update()
    会将TTL重置为新值,而非在原有基础上累加。如果密钥不存在,
    segment.delete()
    返回
    null
    (不会报错)。

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".
使用此技能处理以下相关问题:"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"或"48-hour cache"。

References

参考资料

ReferenceLoad when the query is about…
references/cache-basics.md
SDK operations (get, put, delete, update), Segment ID, 48hr TTL max, string-only values, segment.delete() null gotcha, segment.update() TTL gotcha
参考资料查询以下内容时加载…
references/cache-basics.md
SDK操作(get、put、delete、update)、Segment ID、最长48小时TTL、仅支持字符串值、segment.delete()返回null的注意事项、segment.update()的TTL注意事项