Apple Interview Question

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