The caching facilities of the OpenACS DB API are very helpful.
But one little thing confuses me. In
db_multirow
and the rest of the
DB API,
empty string is allowed for cache_key, and results in the
query being cached!
That surprises me. I think it would be more natural and useful if
passing in -cache_key {} turned caching off.
Is this something anyone would consider changing in a future version,
or is that too much breaking of backwards compatibility?
The semantics are implemented such when a -cache_key is provided, the caching is performed, otherwise not. AFIKT, the same logic is implemented not only for db_multirow, but as well for the other db_* calls. Btw, providing an empty string for turning something off does not sound right to me.