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).
In reply to Re: Ways of caching
by dws
in thread Ways of caching
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |