IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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)

source

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.

Parameters:

alloc()​

alloc(*args, **kwargs)

source

No-op; returns an already-complete transfer (nothing to onload).

Parameters:

Return type:

KVTransfer

block_count()​

block_count(replica_idx=0)

source

Returns a single block; this cache never allocates, so it stays free.

Parameters:

replica_idx (int)

Return type:

BlockCount

claim()​

claim(ctx, replica_idx=0)

source

No-op.

Parameters:

Return type:

None

contains()​

contains(ctx)

source

Returns True for any request.

Parameters:

ctx (TextContext)

Return type:

bool

disk_byte_count()​

disk_byte_count()

source

Returns one permanently used byte.

Return type:

ByteCount

get_metrics_aggregated()​

get_metrics_aggregated()

source

Returns empty aggregated metrics.

Return type:

KVCacheMetrics

host_byte_count()​

host_byte_count()

source

Returns one permanently used byte.

Return type:

ByteCount

pending_transfers_exist()​

pending_transfers_exist(replica_idx=0)

source

Returns False, for the same reason.

Parameters:

replica_idx (int)

Return type:

bool

poll_transfers()​

poll_transfers()

source

No-op; alloc posts nothing, so nothing is ever in flight.

Return type:

None

release()​

release(ctx)

source

No-op.

Parameters:

ctx (TextContext)

Return type:

None

step()​

step(*args, **kwargs)

source

No-op.

Parameters:

Return type:

None

take_metrics_aggregated()​

take_metrics_aggregated()

source

Returns empty aggregated metrics; nothing to reset.

Return type:

KVCacheMetrics