Programming ideas FIFO and LRU algorithm