This is where you look at a performance analysis of the item. It depends on your your caching scheme and the nature of your data. There are a few basic principles behind a cache mechanism that you need to take note of (this is midly off topic). Keep in mind always that a cache is the epitome of the classical space/time tradeoff. With that in mind:
Those reflections should be able to answer your questions for yourself. If you're looking into perl modules:
Or you can roll your own solution taylored to meet your needs. Have fun with the project