Forum OpenACS Q&A: Re: Best way to cache a multirow?

Collapse
Posted by Peter Marklund on
Thanks Jeff,
I'll check on the PG cache and shared buffers.

I experimented with caching the query on the Bookmarks index page. I used util_memoize in conjunction with template::util::list_to_multirow and template::util_multirow_to_list to do the caching and it works fine.

One thing we could optimize though is that the list representation of a multirow (that I store in the cache) has the column names in every row (every row is an array list). I think this is significant overhead if you have verbose column names and many rows. It would suffice to store the column names at index 0 of the list.