Looking at the dmemcache_key function it uses the Drupal cid to create the memcache key. As a result since Drupal's cid on cache_page and cache_block contain the fully qualified URL of the request it's possible in some situations, especially some load-balanced situations that the same cache is being used by servers with different fully qualified URLS.

It seems like there should be some way of using the request path instead of the fully qualified URL to make the cache more efficient since there is the ability to explicitly prefix the key if multi-site behavior is desired.

Comments

mbutcher’s picture

This would be a good thing, right?

First, it means you can use multi-site and Domain Access in conjunction with caching -- a definite must.

Second, it means that multiple servers can use the same cache so long as their hostname is the same -- the typical configuration on a load-balancer.

jeremy’s picture

Status: Active » Closed (works as designed)

Agreed, this is by design.