[imp] Re: folder list caching in IMP 3.x

Chuck Hagenbuch chuck at horde.org
Wed Mar 30 08:42:33 PST 2005


Quoting liam hoekenga <liamr at umich.edu>:

> Ok.. so if IMP 3.x /doesn't/ support folder list caching, and /does/
> regenerate the folder list with each page request... what's this 
> piece of code?
>
> lib/Folder.php ~ ln 98
>        // either get the list from the cache, or go to the IMAP
>        // server to get it if we haven't gotten it yet.
>        if (isset($list_cache[$signature])) {
>            $mailboxes = $list_cache[$signature];
>        } else {

Look at where list_cache is defined above that:

        // Keep around identical lists so that we don't hit the server
        // more that once in the same page for the same thing.
        static $list_cache;

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams


More information about the imp mailing list