in-memory object storage mechanism for javascript using repository pattern