[wp-hackers] WP_Object_Cache and integration with bbPress

Michael D Adams mikea at turbonet.com
Fri Jan 4 07:57:09 GMT 2008


On Jan 3, 2008, at 11:39 PM, Matt Mullenweg wrote:

> Michael D Adams wrote:
>> But other sites (I think only a few sites) will *not* have a  
>> unified user base for their WordPress and bbPress installs.  Let's  
>> take WordPress.org as an example.  There, WordPress and bbPress do  
>> not share the same user table.  Since it's different data, we have  
>> to store it in different places.
>
> Wouldn't that be the responsibility of the cache configuration, not  
> you? I shouldn't configure two different programs to use the exact  
> same cache if they have different data for the same keys. Seems like  
> an edge case.

But configuring the cache is exactly what I'm talking about.

In the case where WordPress and bbPress have a unified user base:
I tell WordPress to grab data labelled "users" from the "users"  
bucket, and I tell bbPress to grab data labelled "bb_users" from that  
same "users" bucket.

In the case where WordPress and bbPress do not have a unified user  
base but do talk to the same memcached server:
I tell WordPress to grab data labelled "users" from the "users"  
bucket, and I tell bbPress to grab data labelled "bb_users" from the  
different "bb_users" bucket.

I agree with you; I think that the later (non-unified user bases but  
the same memcached server) is an edge case.  My proposal assumes the  
former case as its default.  But it still has these different "users"  
and "bb_users" labels so that the edge case can be satisfied.

I neglected to mention another reasonable option in my last email.  To  
differentiate between users and bb_users and to keep the core  
WP_Object_Cache system exactly as it is.  Sites that wanted that extra  
bit of efficiency would then write a custom WP_Object_Cache class to  
translate bb_users => users on their own.


More information about the wp-hackers mailing list