For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
DummyKVCache
DummyKVCache
class max.pipelines.kv_cache.DummyKVCache(*args, **kwargs)
Bases: PagedKVCacheManager
No-op KV cache implementation for testing or when cache is disabled.
Initializes the dummy cache with a single replica and no host swapping.
alloc()
alloc(*args, **kwargs)
No-op; returns an already-complete transfer (nothing to onload).
block_count()
block_count(replica_idx=0)
Returns a single block; this cache never allocates, so it stays free.
-
Parameters:
-
replica_idx (int)
-
Return type:
claim()
claim(ctx, replica_idx=0)
No-op.
-
Parameters:
-
- ctx (TextContext)
- replica_idx (int)
-
Return type:
-
None
contains()
contains(ctx)
Returns True for any request.
-
Parameters:
-
ctx (TextContext)
-
Return type:
disk_byte_count()
disk_byte_count()
Returns one permanently used byte.
-
Return type:
get_metrics_aggregated()
get_metrics_aggregated()
Returns empty aggregated metrics.
-
Return type:
host_byte_count()
host_byte_count()
Returns one permanently used byte.
-
Return type:
pending_transfers_exist()
pending_transfers_exist(replica_idx=0)
Returns False, for the same reason.
poll_transfers()
poll_transfers()
No-op; alloc posts nothing, so nothing is ever in flight.
-
Return type:
-
None
release()
release(ctx)
No-op.
-
Parameters:
-
ctx (TextContext)
-
Return type:
-
None
step()
step(*args, **kwargs)
No-op.
take_metrics_aggregated()
take_metrics_aggregated()
Returns empty aggregated metrics; nothing to reset.
-
Return type: