Hi,

On Wed, 2003-09-24 at 13:54, James Gifford wrote:
> > Actually Aegir's staging/live setup uses 2 different DBs. I think 
> > there's overlap in the page IDs. No?

> Yeh but that's not relevant.

It is relevant...

>   Aegir uses repligard to copy things over 
> from the staging db to live.  It uses the unique id (GUID) in the 
> repligard table and if there is a clashing id for an object in the 
> destination db, repligard will create a new id for that object and then 
> change all the relationships - topics, up etc - so that the new article, 
> for example, ends up in the right place.

...because while the above is an accurate description...
> 
> So the moral is you don't have to worry about any of this.  The only 
> thing you have to do is get it working in staging and make sure you 
> don't use hard coded topic ids in your code because they may change.  If 
> you want to refer to a specific topic like a root topic or a media 
> topic,  use code-init to define these by searching for them by name (see 
> code-init in the sample site).

... and this is a good description of good Midgard coding practice...

...when the staging server would cache a page with id == 17, and then
the live server gets a request for a page with id == 17, it is very
likely that this is not the same page, and even if it where, there is of
course the possibility that staging and live versions are not the
same...

... mod-midgard-preparser will check for the presence of a file 17.php
(or 17-<style_id>.php with --with-cache-fix configure option to midgard-
lib, or 17-<style_id>-<lang_id>.php with --with-multilang option to
 midgard-lib), and see if there's an entry referencing that page,
page-style or page-style-language combination in the cache table. If it
finds it, it will serve the cached file without reassembling the page
first. When staging and live db share the same MidgardPageCacheDir this
could result in staging page being server on the live site and vise
versa.

So, in a staging & live setup, make very sure that staging and live
sites use different MidgardPageCacheDir's.

wkr,

-- 
Envida                     http://www.envida.net/
Armand A. Verstappen       Graadt van Roggenweg 328
[EMAIL PROTECTED]       3531 AH Utrecht
tel: +31 (0)30 298 2255    Postbus 19127
fax: +31 (0)30 298 2111    3501 DC Utrecht

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to