Rkf Handler Engine Utility
Load AMS .kf/.rkf files with process-local handle caching.
This module centralizes lazy KFFile construction and cache-key generation
for AMS-backed engine loaders. It is intentionally small and only manages
handle lifecycle concerns (existence checks, optional load timing callback,
and in-memory reuse keyed by file identity).
Usage context
- Adapter internals: Reused by
AMSAdapterloaders to avoid repeated opens. - Runtime performance: Skips expensive re-loads for unchanged KF/RKF files.
- Diagnostics: Emits optional per-load timing via callback when uncached.
Class: RKFHandler
Method: clear_runtime_cache
Method: kf
Return a cached AMS KFFile handle for this path.
Loads on first access and then reuses the same in-memory handle for subsequent calls while the underlying file identity is unchanged.
Returns:
| Type | Description |
|---|---|
Any
|
|
Examples:
handler = RKFHandler("reaxout.kf")
kf = handler.kf()