This implements the memory object cache and its "reset on grow" semantics, as the web depends on the exact behaviour.