. .

smalltalk

Seaside For Speed

May 22, 2010 11:13:24.076

While I haven't played this type of caching game with Seaside, I've done very similiar things with my blog server (which is an SSP/Servlet type of thing):

my point is that I needed some simple caching of a method's results to help a page load a little faster in Seaside. All I did was add a new instance variable to my model instance that lazy-loaded the result of the calculation. I then added a few more places where this "cache" gets invalidated from other method calls, and I'm done. I didn't have to install gems, configure a new server like memcache, read docs on a gem's interface to memcache, etc. I simply leveraged the tools available in Smalltalk, and built a simple thing that just works. I don't have to worry about persisting it as its lazy-loaded. Which really is how memcache is usually used with Rails, as a place to temporarily store the results of an expensive computation

Yeah, adding a caching scheme to a Smalltalk web app is pretty simple. It's one more way that having an image makes things easier - and not just at development time.

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This