[RCD] sql cache population

Ziba Scott ziba at umich.edu
Thu Dec 18 22:56:51 CET 2008

Hi RC Devs,

I'm looking at the cache in the messages table regarding ticket #1485634.

It looks to me like this is what the caching is currently doing:

In _list_headers, if it is determined that the cache is more than 10%
out of sync, it fetches the headers for the page you are currently on
and puts them in the cache.

Then it erases all the cache entries with an id higher than the page you
are on.

Cache validity checking is per mailbox, not per page, this means that if
I have 20 pages of mail and I delete something on page 18, the cache
will "miss" on every visit to pages 1-17 until I revisit all 17 pages.

Also consider the case where an imap user with dozens of pages of mail
first accesses roundcube.  Their cache will always miss until they visit
every page at least once.

Am I missing something?

Is it too costly for a cache miss to trigger populating the cache with
more than just the page they are on?

Maybe a cache miss could populate the current page plus some set amount
more to keep the time down, but eventually populate the user's whole
cache.  Or maybe it could be adjusted so that the whole mailbox doesn't
have to be represented in the cache for the user to get some benefits
from it.

Thanks for your time,


List info: http://lists.roundcube.net/dev/

More information about the Dev mailing list