implement LRU pruning