Cache double write correction

Cache double write correction, looking for LRU cache memory.