[geeklog-devel] 1.5 error.log when DB dies

Tony Bibbs tony at tonybibbs.com
Wed Aug 13 13:34:45 EDT 2008


Oh, and doing it this way would allow you to still honor the setting in the database.  The only trick would be when you change a value you cached to a file simply invalidate the cache for $someKey.

--Tony



----- Original Message ----
From: Tony Bibbs <tony at tonybibbs.com>
To: Geeklog Development <geeklog-devel at lists.geeklog.net>
Sent: Wednesday, August 13, 2008 12:31:20 PM
Subject: Re: [geeklog-devel] 1.5 error.log when DB dies

<snip>

What am I missing now?
</snip>

Most caching scenarios go like so:

if (!$someValue = $cache->load($someKey)) {
   $someValue = 'foo';
   $cache->store($someValue, $someKey);
}

So if you have 10 geeklog sites the answer is to make sure $someKey is unique.  This would be pretty easy, just pick something unique from the configuration file (site_url, path, etc) and use it as the key.

$someKey = md5($_CONF['site_url'] . '_' . $_CONF['path_logs']);

--Tony
_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel




More information about the geeklog-devel mailing list