Suggestion for bug fix

When getting cached messages, in multisites, if 2 chats have the same ids, the messages appear in both sites.

Code shows in chatroom.cache.apc.inc:

$cache_id = variable_get('chatroom_cache_prefix', 'chatroom_cache_prefix') . '_' . $chat_id;

You should include a salt or some kind of site specific id in the APC var name to be sure it doesn't fetch the wrong drupal site in multisite config.

The 'chatroom_cache_prefix' shall manage this I imagine, but it never gets set. At least set the default value to the global $cookie_domain of the site, this might help.

Regards
Sebastien

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

yes, this is a good idea. patches welcome.

emmene-moi’s picture

Version: 6.x-2.18 » 6.x-2.x-dev
FileSize
8.27 KB

Patch works on my multisite install with APC.

Submitted patch solves issue with or without apc or memcache.
Added settings to modify the default prefix (not mandatory to be included to the prod version).

Regards
Seb

emmene-moi’s picture

Status: Active » Needs review

Marked #716194: Not work in multisite installation as duplicate of this issue

emmene-moi’s picture

Issue summary: View changes

details code location