From: Alexandros V. <av...@no...> - 2004-04-01 13:35:26
|
On Thu, 1 Apr 2004 15:09:13 +0200 (CEST) "Thijs Kinkhorst" <li...@ki...> wrote: > I've got a plan for redoing the file prefs. We store the prefs in a > keyed array $PREFS ($PREFS['full_name'] = "Thijs Kinkhorst"). This > whole array is serialized and then written to disk. Inversely, the > prefs can be loaded by just reading the string from the file and > unserializing it. <snip> > Any thoughts on this plan? Great idea. :-) I'm doing some serialization already for the LDAP prefs backend (available as a Squirrelmail plugin, albeit a bit experimental and in CVS currently); although I break up the prefs pieces to LDAP attributes, I've found that keeping mail fetch and highlight prefs , for instance, in serialized arrays saves me a LOT of trouble, and is generally more 'reliable'. As I also serialize some stuff in the avelsieve plugin and store it in the SIEVE filter, I've found saving versioning information in there handy; if something changes, backward-compatible code will kick in... You can also check that if the versioning information does not exist at all, then do backward-compatible reading of names-values pairs, thus making transition of peoples' data dirs transparent. $0.02 |