[dev] [cvs] commit: imp/lib/IMAP MailboxCache.php

Michael M Slusarz slusarz at horde.org
Fri Mar 9 04:10:39 UTC 2007


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>>> Is there any advantage to this? The old code would work regardless,
>>> and introducing if checks based on Horde versions is fragile and just
>>> hard to maintain. I'd _strongly_ prefer to avoid it.
>>
>> Of course.  Horde_Cache_file:: is completely unusable otherwise for
>> development purposes.  i.e. you can't switch backends transparently
>> (for example, zps4 driver accepts an array but file driver doesn't).
>
> Well, the API may have been unclear, but in this case the file backend
> is right - the cache should only accept a string. And I'm pretty sure
> we don't pass non-string data to the cache at the moment.

If that's the case, I have no issues with requiring string data.   
Obviously, this would be a BC breaking API change, but if we want to  
put the onus on the calling code to serialize as necessary that's fine.

However other drivers may be doing their own serialization techniques  
on given data, so it is quite possible that we would be doing totally  
inefficient double serialization for all other drivers.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list