Text this: Optimal sample length for efficient cache simulation