Apple interview question

Implement an in memory least recently used cache. Design a replication system for a database