Layers and cache