Chris, I believe you are over thinking this. The cache is at its heart just a fancy hashtable, taking the steps to serialize/deserialize (or equivalent) the object is just going to add overhead.
That being said, this might be a case where an empirical answer might be more satisfying, so why not do some testing. See if there is any performance benefit from serializing the objects in the cache. Finally, if you really want to delve into this, MS has a cache framework that you can use to build your own custom cache.. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/CachingArchch6.asp On 10/23/05, Chris Mohan <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any behavior I can add to a custom object to make the > process off adding, storing and retrieving it from asp.net's cache > more efficient? > > While this isn't a remoteable type would making it implement the > ISerializable interface enhance its "cacheability"? Or, rather than > modifying the object itself would caching it as an array of bytes > through the use of a binaryFormatter produce any benefit? > > I guess I'm assuming that storing the object in the cache in a more > native format will enhance the efficiency. For instance I've heard > that datasets are opimized for cache storage and retreival. But.. > what if you are using a strongly typed collection object instead of > a dataset and you want to cache it? > > Right now I just add/retrieve my object (it inherits from > CollectionBase) from the cache as is (I've applied the serializable > attribute to the class for a different reason). This works fine but > I assume it could be done better. > > Any suggestions? > > Thanks very much, > -Chris Mohan > > > > > > > > > > Yahoo! Groups Links > > > > > > > -- Dean Fiala Very Practical Software, Inc http://www.vpsw.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
