[wp-hackers] $wpdb cacheing?

Jacob Santos dragonwing at dragonu.net
Sun Aug 19 19:08:34 GMT 2007


You'll probably want to take a look at WordPress Mu, but if I remember 
correctly, you stated that it doesn't meet your requirements. Perhaps, 
but modifying it might be easier, since its intention is what you want. 
WordPress is meant to be a single blog (CMS) platform. I remember that 
any attempts to make it otherwise has been met with resistance.

It is an interesting problem. I believe I might have seen a couple of 
ways it might be possible. However, since it is not my requirement, I'll 
probably won't investigate any further.

Good luck.

Jacob Santos

Aaron Brazell wrote:
> WP instantiates the db data for a single blog and the cache mechanism revolves around that. I have not tried messing with double installs in the same db so my advice might be bunk, however your best bet is probably raw SQL.
> (via Blackberry)
> Aaron Brazell 
> Director of Technology, b5media
> "A Global New Media Company" 
>
> web:: www.b5media.com, www.technosailor.com
> phone:: 410-608-6620 
> skype:: technosailor     
>
> -----Original Message-----
> From: Stephen Rider <wp-hackers at striderweb.com>
>
> Date: Sun, 19 Aug 2007 03:59:01 
> To:wp-hackers at lists.automattic.com
> Subject: [wp-hackers] $wpdb cacheing?
>
>
> Hi --
>
> I'm trying to make a function that gets a combined list of Pages from  
> two different blogs (both in the same database)
>
> Since the login info is the same, it occurred to me to try changing  
> the table prefix to get the second blog's data.  Here's the code:
>
> $mbpages1 = get_pages( $args );
> $orig_prefix = $wpdb->prefix;
> $wpdb->prefix = 'blah_';
> $mbpages2 = get_pages( $args );
> $mbpages1 = array_merge( $mbpages1, $mbpages2 );
> $wpdb->prefix = $orig_prefix;
>
> It pulls the first blog's data twice.
>
> Is the get_pages being cached somehow?  Is there a way to reset the  
> cache so it pulls the different data?
>
> ....and if I do that, is there a way for me to cache the combined list  
> and thus avoid a big performance hit?
>
> My head hurts.  Thanks in advance.
>
> Stephen
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>   


More information about the wp-hackers mailing list