in reply to Ways of caching

Is that caching? Is there a better way to do it?

Any time you store the result of a computation in a way that's more efficient to retrieve than it is to recompute, you're caching.

Storing a list of stuff in a text file rather than retrieving it from a database can be an effective form of caching, with the caveat that you need to worry about concurrent access to the text file when updating it. Fortunately, flock is fairly well understood (though occasionaly misused).

Replies are listed 'Best First'.
Re^2: Ways of caching
by kiat (Vicar) on Jul 05, 2004 at 14:45 UTC
    Thanks, dws!

    I was concerned about whether it's something that people do and about its effectiveness. With your advice, I feel reassured and will go ahead with its implementation.

    cheers