mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Fix caching keys on space directory (#6421)
This commit is contained in:
parent
f29f6a0fc9
commit
245322e5a6
@ -73,3 +73,4 @@ HumHub Changelog
|
||||
- Enh #6386: Fix absolute base URL in console commands
|
||||
- Fix #79: Fix Headline HelpText Style
|
||||
- Fix #6418: Fix login from modal window
|
||||
- Fix #6415: Fix caching keys on space directory
|
||||
|
@ -230,7 +230,7 @@ class SpaceModelMembership extends Behavior
|
||||
}
|
||||
|
||||
if (!isset($this->_memberships[$userId])) {
|
||||
$this->_memberships[$userId] = Yii::$app->runtimeCache->getOrSet(__METHOD__ . $userId, function() use ($userId) {
|
||||
$this->_memberships[$userId] = Yii::$app->runtimeCache->getOrSet(__METHOD__ . $userId . '-' . $this->owner->id, function() use ($userId) {
|
||||
return Membership::findOne(['user_id' => $userId, 'space_id' => $this->owner->id]);
|
||||
});
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class SpaceDirectoryIcons extends Widget
|
||||
$membersCountQuery->visible();
|
||||
}
|
||||
|
||||
$count = Yii::$app->runtimeCache->getOrSet(__METHOD__ . Yii::$app->user->id, function() use ($membersCountQuery) {
|
||||
$count = Yii::$app->runtimeCache->getOrSet(__METHOD__ . Yii::$app->user->id . '-' . $this->space->id, function() use ($membersCountQuery) {
|
||||
return $membersCountQuery->count();
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user