[dev] [cvs] commit: imp/lib/IMAP MailboxCache.php
chuck at horde.org
Fri Mar 9 04:56:19 UTC 2007
Quoting Michael M Slusarz <slusarz at horde.org>:
> All right - given the argument that we aren't passing $data as
> anything else but a string right now, I have backed out my
> serialization changes. Will make a TODO to change this for 4.0. BTW,
> backing out the changes seems to have also fixed the class not defined
> errors in IMP.
Okay. Can we talk about the rationale for this more before committing
to do it in 4.0, though? I still think that caching large strings
serialized is likely to be a bad idea, and that we can run into
problems unserializing things when we don't know what they are.
Looking around at the other cache backends, memcache seems
representative - according to the php docs, it caches ints and strings
as-is, and other types serialized.
Using autoload (or rather, spl_autoload) in Horde 4 will mitigate some
of the unserialization things. And I could be convinced to put
serializing into the Cache system if we could manage to somehow store
a type hint for the data, such that we could avoid serializing strings
and ints. Obviously some backends would take care of this for us, and
others wouldn't; for the file backend perhaps we could touch an extra
cache file if the data needed to be unserialized. Dunno.
"we are plastered to the windshield of the bus that is time." - Chris
More information about the dev