A cache implementation that uses multiple layers