For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
global_cache_insert
def global_cache_insert(key: String, value: Pointer[NoneType, _safe=True])
Inserts a pointer into the process-wide compiler runtime global cache.
Stores value under key in the KGEN compiler runtime's global
dictionary. Subsequent calls with the same key can retrieve the pointer
via _get_global_or_null. Used to cache lazily-initialized resources
(such as EP communicator handles) across kernel invocations without
re-initialization overhead.
Args:
- key (
String): The string key to storevalueunder. - value (
Pointer[NoneType, _safe=True]): An opaque pointer to the resource to cache.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!