Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LMCache/LMCache
/ functions
Functions
13,371 in github.com/LMCache/LMCache
⨍
Functions
13,371
◇
Types & classes
2,044
↳
Endpoints
181
↓ 455 callers
Method
publish
Submit an event (hot path — non-blocking). The event's ``timestamp`` is set to ``time.time()`` at call time. When the queue is full t
lmcache/v1/mp_observability/event_bus.py:196
↓ 441 callers
Method
get
(self, key: str)
tests/v1/distributed/test_s3_l2_adapter.py:63
↓ 401 callers
Method
debug
Return a simple health-check string. Returns: The literal string ``"OK"``.
lmcache/v1/multiprocess/modules/management.py:178
↓ 314 callers
Method
get
Get the blender by instance_id.
lmcache/v1/compute/blend/utils.py:54
↓ 297 callers
Method
start
Start no background thread.
tests/v1/multiprocess/test_lmcache_driven_layout_registry.py:30
↓ 284 callers
Function
init_logger
(name: str)
lmcache/logging.py:55
↓ 245 callers
Method
encode
Encode an asymmetric (K, V) pair into one EncodedKV blob. If `precomputed_v_quant` is provided it is used as-is: the caller has alrea
lmcache/v1/kv_codec/asym_k16_v8.py:271
↓ 241 callers
Method
pop
(self)
lmcache/v1/storage_backend/nixl_storage_backend.py:275
↓ 211 callers
Method
data_ptr
Get the data pointer of the MemoryObj. This is used to access the raw data in the memory.
lmcache/v1/memory_management.py:372
↓ 195 callers
Method
stop
Stop no background thread.
tests/v1/multiprocess/test_lmcache_driven_layout_registry.py:33
↓ 185 callers
Method
tensor
Get the tensor from the MemoryObj.
lmcache/v1/memory_management.py:355
↓ 170 callers
Method
result
(self, timeout=None)
tests/v1/distributed/l2_adapters/test_p2p_l2_adapter.py:39
↓ 169 callers
Method
decode
Decode an EncodedKV into (K, V_quant_or_dequant, scales). If `out_v_dtype` is None, V is returned at its native FP8 dtype (storage_on
lmcache/v1/kv_codec/asym_k16_v8.py:412
↓ 165 callers
Method
test
Return whether one bit is set.
tests/v1/distributed/conftest.py:31
↓ 160 callers
Method
add
Record a top-level metric (not inside any named section). Args: key: Machine-readable key (used in JSON output). labe
lmcache/cli/metrics/metrics.py:132
↓ 157 callers
Method
to_string
(self)
lmcache/utils.py:448
↓ 149 callers
Method
get
Load the encoder output tensor for ``mm_hash`` if present. Args: mm_hash: multimodal-input identifier produced by vLLM.
lmcache/v1/ec_engine.py:171
↓ 147 callers
Method
ref_count_down
(self)
tests/v1/storage_backend/test_storage_manager.py:44
↓ 145 callers
Method
values
(self)
lmcache/cli/commands/bench/engine_bench/interactive/state.py:78
↓ 144 callers
Method
set
Set one bit by index.
tests/v1/distributed/conftest.py:24
↓ 142 callers
Method
get
(self, key: CacheEngineKey)
lmcache/v1/storage_backend/connector/mock_connector.py:63
↓ 139 callers
Method
close
Close the backend.
tests/v1/storage_backend/test_storage_plugin.py:123
↓ 139 callers
Method
view
(self, *new_shape)
tests/v1/multiprocess/test_blend_v3_load_store_opts.py:225
↓ 124 callers
Method
get
Return ``(span, context)`` for an open span, or ``None``. Args: session_id: The request session identifier. span_name
lmcache/v1/mp_observability/subscribers/tracing/span_registry.py:63
↓ 124 callers
Method
reshape
(self, *new_shape)
tests/v1/multiprocess/test_blend_v3_load_store_opts.py:222
↓ 120 callers
Method
get_store_event_fd
(self)
tests/v1/distributed/test_l2_adapter_base.py:39
↓ 114 callers
Method
submit_store_task
(self, keys, objects)
tests/v1/distributed/test_l2_adapter_base.py:48
↓ 107 callers
Method
run
(self)
lmcache/v1/server/__main__.py:137
↓ 105 callers
Method
pop_completed_store_tasks
(self)
tests/v1/distributed/test_l2_adapter_base.py:51
↓ 104 callers
Method
result
Get the result of the future. Args: timeout (Optional[float]): Maximum time to wait in seconds. If None,
lmcache/v1/multiprocess/futures.py:39
↓ 102 callers
Method
ref_count_down
Decrease ref count for the given MemoryObj by one.
lmcache/v1/memory_management.py:315
↓ 95 callers
Method
register_subscriber
Register an ``EventSubscriber`` and wire up its callbacks.
lmcache/v1/mp_observability/event_bus.py:150
↓ 94 callers
Method
get_lookup_and_lock_event_fd
(self)
tests/v1/distributed/test_l2_adapter_base.py:42
↓ 93 callers
Method
query_lookup_and_lock_result
(self, task_id)
tests/v1/distributed/test_l2_adapter_base.py:57
↓ 92 callers
Method
add
(self, item: Union[str, int])
lmcache/v1/utils/bloom_filter.py:52
↓ 91 callers
Method
get
(self, key: str, default: Any = None)
lmcache/cli/commands/bench/engine_bench/interactive/state.py:71
↓ 88 callers
Method
update
Update the request tracker when a running request is scheduled again vllm_cached_tokens: the number of tokens that are cached in vLLM
lmcache/integration/vllm/vllm_v1_adapter.py:209
↓ 87 callers
Method
close
(self)
tests/v1/distributed/test_l2_adapter_base.py:69
↓ 87 callers
Method
device
Return a context manager that sets the current device. Args: device: The device to select. Ignored in the stub. Returns:
lmcache/v1/platform/cpu/stub_cpu_device.py:229
↓ 86 callers
Method
submit_lookup_and_lock_task
(self, keys, layout_desc: MemoryLayoutDesc)
tests/v1/distributed/test_l2_adapter_base.py:54
↓ 83 callers
Method
get_usage
Return the current L2 storage utilization as an ``AdapterUsage``. The default implementation returns the totals maintained by the
lmcache/v1/distributed/l2_adapters/base.py:499
↓ 83 callers
Function
make_object_key
Helper to create ObjectKey instances.
tests/v1/distributed/test_l1_manager.py:147
↓ 82 callers
Method
close
(self)
tests/v1/test_hidden_state_store.py:88
↓ 82 callers
Method
reserve_write
Reserve write access for the given keys. Args: keys: The list of object keys to reserve write access for. is_temporar
lmcache/v1/distributed/l1_manager.py:433
↓ 81 callers
Function
generate_kv_cache_paged_list_tensors
Instead of Tuple[Tuple[Tensor, Tensor]], return List[Tensor] where KV are in the same tensor
tests/v1/utils.py:287
↓ 81 callers
Method
lookup
( self, token_ids: Union[torch.Tensor, list[int]], lookup_id: str, request_con
tests/v1/lookup_client/test_chunk_statistics_lookup_client.py:41
↓ 80 callers
Method
close
Close the L1Manager and free all resources.
lmcache/v1/distributed/l1_manager.py:818
↓ 80 callers
Method
match
Match request tokens against the directory. Rolls a chunk-window hash over the request, then probes the scope's direct-address table
lmcache/v1/mp_coordinator/blend_directory.py:341
↓ 79 callers
Method
get
Return the instance with the given id, or ``None`` if unknown. Args: instance_id: Identifier to look up. Returns:
lmcache/v1/mp_coordinator/registry.py:98
↓ 79 callers
Method
wait
Wait for I/O completion and return results. Returns: List of MockIorResult, each with .result containing bytes transferred
tests/conftest.py:473
↓ 78 callers
Method
allocate
Allocate a block of memory from the virtual address space of a given size. The actual allocated size could be larger than the request
lmcache/v1/memory_management.py:1357
↓ 74 callers
Method
allocate
(self, *args, **kwargs)
tests/v1/storage_backend/test_gds_backend.py:502
↓ 74 callers
Method
from_dict
(cls, d: dict)
tests/v1/distributed/test_l2_adapter_factory.py:306
↓ 74 callers
Method
gather
Return values selected by set bit indices.
tests/v1/distributed/conftest.py:50
↓ 74 callers
Method
is_set
(self, key: str)
lmcache/cli/commands/bench/engine_bench/interactive/state.py:68
↓ 73 callers
Method
check_consistency
Check if the address manager is consistent. Returns: True if consistent, False otherwise.
lmcache/v1/memory_management.py:1558
↓ 73 callers
Method
delete
(self, key: str)
tests/v1/distributed/test_s3_l2_adapter.py:71
↓ 73 callers
Method
finish_read
Finish read access for the given keys. Will delete the object if it is temporary and read count reaches zero. Args:
lmcache/v1/distributed/l1_manager.py:334
↓ 71 callers
Method
get
(self, key: str, buf: memoryview)
lmcache/v1/storage_backend/resp_client.py:143
↓ 68 callers
Method
get
(self, key)
tests/conftest.py:184
↓ 66 callers
Method
finish_write
Finish write access for the given keys. Args: keys: The list of object keys to finish write access for. Returns:
lmcache/v1/distributed/l1_manager.py:530
↓ 65 callers
Method
get_indices_list
Return set bit indices in ascending order.
tests/v1/distributed/conftest.py:35
↓ 64 callers
Method
get_size
Get the size of the MemoryObj in bytes. Note that this number could be smaller than the physical size. The physical size is a
lmcache/v1/memory_management.py:222
↓ 61 callers
Method
get_load_event_fd
(self)
tests/v1/distributed/test_l2_adapter_base.py:45
↓ 59 callers
Function
create_event_notifier
Create a platform-appropriate EventNotifier. On Linux (Python 3.10+), returns an ``EventfdNotifier``. On other platforms, returns a ``PipeNot
lmcache/v1/platform/event_notifier.py:224
↓ 57 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
operator/api/v1alpha1/zz_generated.deepcopy.go:31
↓ 57 callers
Method
pop
Remove and return ``(span, context)``, or ``None`` if absent. Args: session_id: The request session identifier. span_
lmcache/v1/mp_observability/subscribers/tracing/span_registry.py:91
↓ 57 callers
Method
register
Record no native callback registration.
tests/v1/multiprocess/test_lmcache_driven_layout_registry.py:27
↓ 56 callers
Method
get
(self, key)
tests/v1/test_remote_mla_worker_id_as0.py:35
↓ 56 callers
Method
record
Mark this event as recorded on the given stream. Args: stream: The stream to record on. If None, uses the current
lmcache/v1/platform/cpu/stub_cpu_device.py:45
↓ 54 callers
Function
autorelease_v1
(request)
tests/conftest.py:716
↓ 54 callers
Function
dumb_cache_engine_key
(id: int = 0)
tests/v1/utils.py:190
↓ 54 callers
Method
submit_job
( self, fn: Callable[..., Awaitable[Any]], *args: Any, **kwargs: Any, )
lmcache/v1/storage_backend/job_executor/pq_executor.py:43
↓ 53 callers
Method
submit_load_task
(self, keys, objects)
tests/v1/distributed/test_l2_adapter_base.py:63
↓ 52 callers
Function
create_test_memory_obj
Create a test MemoryObj using AdHocMemoryAllocator for testing.
tests/v1/utils.py:851
↓ 52 callers
Method
get_free_size
Get the total free size in the address space. Returns: The total free size in bytes.
lmcache/v1/memory_management.py:1549
↓ 52 callers
Method
send
(cmd)
tests/v1/shm_allocator/test_shm_allocator.py:349
↓ 52 callers
Method
set_result
Set the result of the future and mark it as done. This function is NOT SUPPOSED TO BE CALLED by users directly. It should be only cal
lmcache/v1/multiprocess/futures.py:58
↓ 52 callers
Method
submit_unlock
(self, keys)
tests/v1/distributed/test_l2_adapter_base.py:60
↓ 52 callers
Method
synchronize
(self)
tests/v1/distributed/test_devdax_l1_allocator.py:87
↓ 51 callers
Method
is_successful
Return ``True`` when the store task succeeded.
lmcache/v1/distributed/internal_api.py:194
↓ 51 callers
Method
popcount
Return the number of set bits.
tests/v1/distributed/conftest.py:39
↓ 50 callers
Method
get
Get a value.
tests/v1/storage_backend/test_remote_storage_plugin.py:53
↓ 50 callers
Method
query_load_result
(self, task_id)
tests/v1/distributed/test_l2_adapter_base.py:66
↓ 48 callers
Method
allocate
Returns a dummy MemoryObj for testing purposes.
lmcache/v1/memory_management.py:3129
↓ 47 callers
Function
check_paged_kv_cache_equal
check whether two paged kv caches are the same at slot_mapping
tests/v1/utils.py:443
↓ 47 callers
Method
clear
(self)
tests/v1/storage_backend/test_audit_connector.py:140
↓ 47 callers
Method
free
Free a previously allocated block of memory. Args: address: The starting address of the block to free. size:
lmcache/v1/memory_management.py:1499
↓ 47 callers
Method
handle_batched_kv_operations
Handle batched KV operations with single lock acquisition. Logs warning and calls callback if sequence out of order is detected.
lmcache/v1/cache_controller/utils.py:82
↓ 47 callers
Method
reserve_read
Reserve read access for the given keys. Args: keys: The list of object keys to reserve read access for.
lmcache/v1/distributed/l1_manager.py:238
↓ 47 callers
Method
set_quota
Create or update the quota for ``cache_salt``. Raises ``ValueError`` for a negative limit. A zero limit is accepted and behaves ident
lmcache/v1/distributed/quota_manager.py:39
↓ 46 callers
Method
close
Close the storage manager and release all resources.
lmcache/v1/distributed/storage_manager.py:915
↓ 46 callers
Method
count_leading_ones
Return the length of the leading contiguous set-bit prefix.
tests/v1/distributed/conftest.py:43
↓ 45 callers
Function
_chunk
Deterministic chunk_size tokens derived from seed; unique per seed.
tests/v1/multiprocess/test_optimized_lookup_v3.py:365
↓ 45 callers
Function
make_key
Create an ObjectKey for testing.
tests/v1/distributed/test_lru_eviction_policy.py:27
↓ 45 callers
Function
ptr
--- helpers ---
operator/internal/resources/resources_test.go:39
↓ 44 callers
Function
generate_tokens
(num_tokens, device, fixed=False)
tests/v1/utils.py:386
↓ 44 callers
Method
set
(self, key: str, buf: memoryview)
lmcache/v1/storage_backend/resp_client.py:153
↓ 43 callers
Method
get_or_create
Builds a new LMCacheEngine instance if it doesn't already exist for the given ID. raises: ValueError if the instance already
lmcache/v1/cache_engine.py:2096
↓ 43 callers
Method
result
(self, timeout=None)
tests/v1/multiprocess/test_engine_driven_transfer.py:1362
next →
1–100 of 13,371, ranked by callers