Caching in WinForms

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/8/12/caching-in-winforms.html
Published Tuesday, August 12, 2003 7:44 PM by RoyOsherove
Filed under:

Comments

Tuesday, August 12, 2003 3:56 PM by Addy Santo

# re: Caching in WinForms


"Just-in-time invalidation" gives best performance and is simplest to implement. Just imagine what would happen if you tried to implement realtime invalidation of a cache with thousands of items, each with varying expiration criteria... the expiration management would probably drain more resources than the actual data being cached!

Implementing a *simple* determistic invalidation mechanism should be fairly simple - just spawn a thread which periodically accesses the cache object to remove/refresh items.

And GL!
Tuesday, August 12, 2003 5:11 PM by Roy Osherove

# re: Caching in WinForms

Addy - I agree. I do think that there should be an API that allows this, as well as how it works now. Let me decide if I want to sacrifice performance in specific cases.
Friday, January 26, 2007 3:22 PM by La Code Poete

# re: Caching in WinForms

Or you can always write your own to do what you want instead of crying that you have to do a little work...