[imp] pgp-encrypted emails blowing up session

Oliver Kuhl okuhl at netcologne.de
Wed Apr 14 23:33:34 PDT 2004



Michael M Slusarz wrote:

> Quoting Oliver Kuhl <okuhl at netcologne.de>:
>> I looked at the size of my session and found out that reading encrypted
>> emails blows the session, because the decrypted email seems to be saved
>> in the session everytime I open it again and again.
> 
> There is nothing wrong here.  An unfortunate side effect of a session-based
> environment (i.e. PHP) is the need to cache information between page loads
> since we can not keep that information in memory as it will be lost when 
> the
> pageload is terminated.  Thus, we have to cache all MIME objects to 
> prevent us
> from having to redo the (potentially expensive) process of building up 
> the MIME
> Structure/contents/etc.

> So, if you have a large amount of data in these embedded MIME parts, 
> they will
> take up a large amount of space in the cache backend.  Since our caching
> algorithim does not recognize that we have already cached an item (it won't
> know that we cached IMAP index 1 once you leave the page), it has to 
> create a
> new cache object every page load.  This is why you are seeing the 
> increase in
> size.
If I understand you right, the caching of horde just caches things in 
context of _one pageview_ and does not reuse everthing cached the next 
time I view the same page again? The cache makes sense, because you use 
the MIME parts of a message more then once during page creation (that's 
what you tried to tell me with the IMAP index 1, Part 2.2 with encrypted 
mails, didn't you?). Hmm - but that's not what I expected.

Is there any specific reason besides it's simply not yet implemented why 
you cannot reuse the stuff?

> However, note there is a limit to how large this cache will be - the 
> maximum
> number of objects is located in the SessionObjects::$_size variable (by 
> default
> it is 20).  So the session size will eventually reach a plateau - it 
> will not
> infintely grow larger.
That's a good message! :-)

Thanks again for your detailed reply. It helps me a lot to understand 
IMP/Horde a bit more.

Gruss,
    Ollie.


More information about the imp mailing list