Evented JavaScript in-memory cache