Simple cache implementation.