added PerInstanceMemoryCache + related tests