Re: Conf cache

Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/[email protected]> Mon, 28 Feb 2005 21:22:39 +0100
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
alex black wrote:
> I don't actually know what's preloaded right now by conf and in what 
> order (I should) but jcm - we don't currently have any notion of 
> defaults right?

No, there is a preload now but no overriding of params.
Preload was added because conf errors occured at some strange places 
because of a missing file. I preferred to have errors occurring earlier.
And the api is simpler, whatever the path a conf can be queried by its 
domain only.

> Jcm, manuel - what do you guys thing about "factory" defaults and 
> workspace config in xml conf?

Answered in the other thread:
   in xml
      factory settings are in binarycloud/*/conf
      workspace are in $WORKSPACE/conf
   in sql
      we need a field

so we require
SELECT value FROM bc_conf WHERE path=? ORDER BY level DESC LIMIT 1;
if level is enumerated (factory, workspace);
With this a workspace setting will override a factory one.

We will always want to retrieve a factory setting if there is one for 
the queried path. Retrieveing the factory value when the workspace one 
exists can be useful only in the web conf admin, and even there I'm not 
sure it's useful (factory settings could be thought of as default 
values, instead of changing them you create your setting in workspace 
level).
That's why using 'workspace' as path prefix is useless.

-- 
Jean-Christophe Michel
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev