Forum OpenACS Development: Re: Using the function "ad_set_client_property".

Collapse
Posted by Tom Jackson on

Caching session data is probably a bug. One reason to place session data into the database is so that you can transparently move from one front-end server to multiple servers. It isn't expensive if you have few users, and if you have many, another front-end server shouldn't be expensive either.

Caching should really be reserved for shared data. Even dynamic data can be cached for a short period of time. I imagine that you could cache most website front pages and index pages for a few minutes at least without any impact on the dynamic appearance of the site.

And if you can't turn off caching during development, why not just pull out a gun and get it over with? Turning on caching is like turning off logging. Maybe another concept is that you shouldn't have to test your package to see if it fails when using a cache. If the cache is not your code, it probably points to a bug in the code using a cache.

Maybe there is another way of putting it: don't cache inputs or intermediate results. Cache results which are likely to be valid for a useful amount of time.