modified cache trimming to only remove 10% of cache at a time