[typo] multi-db typo cache problems

Scott Laird scott at sigkill.org
Wed Mar 15 09:19:59 EST 2006


Wow, this one's new to me.
The cache *should* work if you're using a version of Typo new enoughto use the action cache.  The hostname should be part of the cachekey.  Take a look at vendor/plugins/expiring_action_cache and add somedebugging code to see what's happening.
Frankly, the multi-blog DB connect code in that post is kind ofhideous.  It needs more error checking, and it really ought to cacheDB connections or something--as it is, it looks like it'll do a newconnection for every hit.
There are a couple people working on moving multi-blog support intothe core of Typo, but I don't know when we'll see working code--itmight be today, it might be next year.

Scott
On 3/15/06, Csaba Henk <csaba-ml at creo.hu> wrote:> Hi!>> I'm using typo on Lighttpd + FastCGI (recent snapshot, namely r762). It> serves more than one db, using the trick described at>>   http://sg.validcode.at/articles/2005/12/04/how-to-host-multiple-blogs-with-on-typo-installation>> I had to disable caching, because Typo reuses the cache contents> regardless of switching between blogs, so you get one blogger's blog> when you'd like to see the blog of another one. Even so, parts of blog> content (eg., title/subtitle field) will be slightly mixed when asking> for one's blog after the other's, and the real blog will be seen only> after a browser refresh. (Notes here:>>   - no, it's not browser cache, I tested with two distinct browser>     instances;>   - if I had caching enabled, browser refresh wouldn't help either.>> )>> Moreover, if I ask for a nonexistent blog (db table) foo (via the> appropriate subdomain), I get a mysql error. That's OK, but from that on> Typo just keeps on whining that "can't connect database foo" (even if I> want to access existing blogs). (Yeah, as a workaround I can get the> webserver allow only subdomains where there is an existing blog, but I'd> prefer to keep config orthogonal, that is, there should be exactly one> thing to modify in order to add a new blog, ie. add a new MySQL table).>> Can you give me advice how to solve these?>> Regards,> Csaba>> _______________________________________________> Typo-list mailing list> Typo-list at rubyforge.org> http://rubyforge.org/mailman/listinfo/typo-list>


More information about the Typo-list mailing list