mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 19:23:42 +08:00
25 lines
625 B
Java
25 lines
625 B
Java
package vip.mate.llm.cache;
|
|
|
|
/**
|
|
* 占位策略:永不打缓存断点。
|
|
*
|
|
* <p>用于 {@link AdaptiveCacheStrategy} 在连续 cache miss 后降级,
|
|
* 或在 {@code mateclaw.llm.cache.enabled=false} 时全局短路。</p>
|
|
*/
|
|
public final class NoOpCacheStrategy implements PromptCacheStrategy {
|
|
|
|
public static final NoOpCacheStrategy INSTANCE = new NoOpCacheStrategy();
|
|
|
|
private NoOpCacheStrategy() {}
|
|
|
|
@Override
|
|
public CachedPlan plan(CachePlanContext ctx) {
|
|
return CachedPlan.none();
|
|
}
|
|
|
|
@Override
|
|
public boolean shouldCache(CachePlanContext ctx) {
|
|
return false;
|
|
}
|
|
}
|