fixes inMemorySaved variable location

The scoping was wrong, so it was being re-created on each request.