This pattern was previously described in Grand98.


During the discussion of the Counting Proxy we had developed an application to read all order records from a data file and log the time it takes to read these records. When the application is executed multiple times with a large number of orders in the data file, it can be observed that compared to the time taken to read orders from the data file during the first time execution, it takes less time to read the data file in subsequent application executions.

Every time the operation to read all orders is performed in the application, from the program code point of view, it should take exactly the same amount of time. This is because the code that gets executed and ...

Get Software Architecture Design Patterns in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.