Forum: Typo multi-db typo cache problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D6bfbbb1df5426e664f876a3bbbede6b?d=identicon&s=25 Csaba Henk (Guest)
on 2006-03-15 12:02
(Received via mailing list)
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-...

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
D6bfbbb1df5426e664f876a3bbbede6b?d=identicon&s=25 Csaba Henk (Guest)
on 2006-03-15 12:13
(Received via mailing list)
On 2006-03-15, Csaba Henk <csaba-ml@creo.hu> wrote:
> I'm using typo on Lighttpd + FastCGI (recent snapshot, namely r762). It

And it's r876. Why on earth do I see "Typo r762" at the bottom of the
admin interface?

Regards,
Csaba
Dc3f3775a7d03ba1be8958aaee881d6b?d=identicon&s=25 Scott Laird (Guest)
on 2006-03-15 15:13
(Received via mailing list)
The version string is broken.  It's been fixed, sort of, in newer
versions.

Scott
On 3/15/06, Csaba Henk <csaba-ml@creo.hu> wrote:> On 2006-03-15, Csaba
Henk <csaba-ml@creo.hu> wrote:> > I'm using typo on Lighttpd + FastCGI
(recent snapshot, namely r762). It>> And it's r876. Why on earth do I
see "Typo r762" at the bottom of the> admin interface?>> Regards,>
Csaba>> _______________________________________________> Typo-list
mailing list> Typo-list@rubyforge.org>
http://rubyforge.org/mailman/listinfo/typo-list>
Dc3f3775a7d03ba1be8958aaee881d6b?d=identicon&s=25 Scott Laird (Guest)
on 2006-03-15 15:23
(Received via mailing list)
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@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-...
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 keep!
s 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@rubyforge.org>
http://rubyforge.org/mailman/listinfo/typo-list>
D6bfbbb1df5426e664f876a3bbbede6b?d=identicon&s=25 Csaba Henk (Guest)
on 2006-03-16 10:30
(Received via mailing list)
On 2006-03-15, Scott Laird <scott@sigkill.org> wrote:
> 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.

I see. I don't have time for debugging it now (I hoped I can get along
with
utilizing someone's expertise :)). I'll look back when I get to the
point
that I can devote time for it.

>  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.

Yeah, that's pathetic...

> 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.

I hope for the best...

Thanks for the answers, I at least have some picture now :)

Regards,
Csaba
This topic is locked and can not be replied to.