cache key for member_ids

This commit is contained in:
Evan Prodromou 2012-07-04 14:39:26 -04:00
parent 69fb79caae
commit 1c3c269ab4
2 changed files with 3 additions and 3 deletions

View File

@ -595,7 +595,7 @@ class Profile extends Managed_DataObject
if (Event::handle('StartJoinGroup', array($group, $this))) {
$join = Group_member::join($group->id, $this->id);
self::blow('profile:groups:%d', $this->id);
self::blow('group:members:%d', $group->id);
self::blow('group:member_ids:%d', $group->id);
self::blow('group:member_count:%d', $group->id);
Event::handle('EndJoinGroup', array($group, $this));
}
@ -617,7 +617,7 @@ class Profile extends Managed_DataObject
if (Event::handle('StartLeaveGroup', array($group, $this))) {
Group_member::leave($group->id, $this->id);
self::blow('profile:groups:%d', $this->id);
self::blow('group:members:%d', $group->id);
self::blow('group:member_ids:%d', $group->id);
self::blow('group:member_count:%d', $group->id);
Event::handle('EndLeaveGroup', array($group, $this));
}

View File

@ -148,7 +148,7 @@ class User_group extends Managed_DataObject
$ids = $this->getMemberIDs($offset,
$limit);
} else {
$key = sprintf('group:members:%d', $this->id);
$key = sprintf('group:member_ids:%d', $this->id);
$window = self::cacheGet($key);
if ($window === false) {
$window = $this->getMemberIDs(0,