in reply to Synchronizing constants/enums in database and code

Following up on what Liz said...

I was in a similar situation. Here's what I did:

And because it's under mod_perl, the code that builds the hashref is in a startup.pl that is called when Apache starts, so it's instantly available to my scripts, and DB calls are only made when the server starts.

cLive ;-)

  • Comment on Re: Synchronizing constants/enums in database and code

Replies are listed 'Best First'.
Re: Re: Synchronizing constants/enums in database and code
by dragonchild (Archbishop) on Apr 11, 2004 at 15:11 UTC
    I do the exact same thing, but with my security tree. I build all the possible access levels in memory, which saves up to 2000 database hits per page.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose