The 80B Qwen3-Coder-Next on a 16 GB Mac, about 13 tok/s, fully offline. A mixture-of-experts inference engine for Apple silicon.
Rust
Write a TypeScript class LruCache<K, V> with a maximum capacity and a per-entry time-to-live in milliseconds. Requirements, all of them matter: get(key) returns the value and marks the entry most recently used but must NOT extend its expiry; peek(key) returns the value without changing recency; set(key, value, ttlMs?) on an existing key replaces the value, resets its expiry and makes it most recently used, with ttlMs defaulting to the cache-wide default; has(key) must return true for a live entry whose stored value is undefined and false for a missing or expired key; no timers of any kind, expiry is checked lazily on access; when the cache is full and a new key is inserted, evict expired entries first and only if none are expired evict the least recently used; the constructor must throw a RangeError if capacity is less than 1; all operations O(1) on average using Map insertion order for recency. Export the class. Include a short usage example that prints results for get, peek and has.