Removed unused layer cache code