CachePolicy
public enum CachePolicy
源码Source
io/agentscope/core/model/CachePolicy.java:33–45定义缓存策略相关取值的枚举。位于 io.agentscope.core.model 包。核心成员包括 DEFAULT、DISABLED、ENABLED。
Controls whether ModelRegistry caches models created with a
ModelCreationContext.
Policy summary:
-
#DEFAULT: preserves legacy behavior. Empty contexts are cached by model id; non-empty contexts are not cached. -
#DISABLED: never cache. Every resolution creates a new model instance. -
#ENABLED: opt-in caching. The cache identity is either the explicitcacheIdsupplied by the caller or a fingerprint derived only from standard simple fields. Contexts containing opaque options/components require an explicitcacheId.
枚举常量摘要Enum Constant Summary
| 常量Constant | 说明Description |
|---|---|
DEFAULT | 执行默认相关操作。 Preserve registry defaults. |
DISABLED | 禁用D。 Never cache the created model. |
ENABLED | 启用D。 Cache the created model using an explicit or safely derived context cache identity. |
枚举常量详情Enum Constant Detail
DEFAULT
DEFAULT
staticfinal
执行默认相关操作。
Preserve registry defaults.
源码Source
io/agentscope/core/model/CachePolicy.java:38DISABLED
DISABLED
staticfinal
禁用D。
Never cache the created model.
源码Source
io/agentscope/core/model/CachePolicy.java:41ENABLED
ENABLED
staticfinal
启用D。
Cache the created model using an explicit or safely derived context cache identity.
源码Source
io/agentscope/core/model/CachePolicy.java:44