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

Files: 

Comments

yes, this is a good idea. patches welcome.

Version:6.x-2.18» 6.x-2.x-dev
StatusFileSize
new8.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

Status:Active» Needs review

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

Issue summary:View changes

details code location