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:

KVConnectorTransfer

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(replica_idx=0)

source

Returns one permanently used byte.

Parameters:

replica_idx (int)

Return type:

ByteCount

get_metrics_aggregated()

get_metrics_aggregated()

source

Returns empty aggregated metrics.

Return type:

KVCacheMetrics

host_byte_count()

host_byte_count(replica_idx=0)

source

Returns one permanently used byte.

Parameters:

replica_idx (int)

Return type:

ByteCount

release()

release(ctx)

source

No-op.

Parameters:

ctx (TextContext)

Return type:

None

reset_metrics()

reset_metrics()

source

No-op.

Return type:

None

step()

step(*args, **kwargs)

source

No-op.

Parameters:

Return type:

None