forked from GNUsocial/gnu-social
cache key for member_ids
This commit is contained in:
parent
69fb79caae
commit
1c3c269ab4
@ -595,7 +595,7 @@ class Profile extends Managed_DataObject
|
|||||||
if (Event::handle('StartJoinGroup', array($group, $this))) {
|
if (Event::handle('StartJoinGroup', array($group, $this))) {
|
||||||
$join = Group_member::join($group->id, $this->id);
|
$join = Group_member::join($group->id, $this->id);
|
||||||
self::blow('profile:groups:%d', $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);
|
self::blow('group:member_count:%d', $group->id);
|
||||||
Event::handle('EndJoinGroup', array($group, $this));
|
Event::handle('EndJoinGroup', array($group, $this));
|
||||||
}
|
}
|
||||||
@ -617,7 +617,7 @@ class Profile extends Managed_DataObject
|
|||||||
if (Event::handle('StartLeaveGroup', array($group, $this))) {
|
if (Event::handle('StartLeaveGroup', array($group, $this))) {
|
||||||
Group_member::leave($group->id, $this->id);
|
Group_member::leave($group->id, $this->id);
|
||||||
self::blow('profile:groups:%d', $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);
|
self::blow('group:member_count:%d', $group->id);
|
||||||
Event::handle('EndLeaveGroup', array($group, $this));
|
Event::handle('EndLeaveGroup', array($group, $this));
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ class User_group extends Managed_DataObject
|
|||||||
$ids = $this->getMemberIDs($offset,
|
$ids = $this->getMemberIDs($offset,
|
||||||
$limit);
|
$limit);
|
||||||
} else {
|
} else {
|
||||||
$key = sprintf('group:members:%d', $this->id);
|
$key = sprintf('group:member_ids:%d', $this->id);
|
||||||
$window = self::cacheGet($key);
|
$window = self::cacheGet($key);
|
||||||
if ($window === false) {
|
if ($window === false) {
|
||||||
$window = $this->getMemberIDs(0,
|
$window = $this->getMemberIDs(0,
|
||||||
|
Loading…
Reference in New Issue
Block a user