I'm part of cleaning up an app that caches everything that comes up from the database and that isn't too good. You don't need to cache little things like a list of U.S. States because the performance gain is miniscule but you do need to only cache things that change rarely, like, say a list of U.S. States. Ha ha. Maybe a list of vendor cities is a more applicable example, not a list of vendor paychecks in an accounts payable system which would be added all the time. When a vendor city does change, what do you do about the cache that no longer reflects reality? Do you have the caches expire ever so often or do you explicitly associate dropping things out of the cache to writing to the database?
No comments:
Post a Comment