mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix caching of space permissions in user stream (#7358)
This commit is contained in:
parent
34bdcadb0d
commit
887cf5f1ed
@ -19,6 +19,7 @@ HumHub Changelog
|
||||
- Fix #7319: Display correct profile field value in user subtitle
|
||||
- Fix #7322: Always allow invitation by link from Administration. Implement separate invitation by link from People.
|
||||
- Enh #7335: Update GitHub workflow versions
|
||||
- Fix #7351: Fix caching of space permissions in user stream
|
||||
|
||||
1.16.2 (September 5, 2024)
|
||||
--------------------------
|
||||
|
@ -245,8 +245,10 @@ class PermissionManager extends Component
|
||||
// recorded group id will not be fetched again
|
||||
$this->_groupPermissions += array_fill_keys($ids, []);
|
||||
|
||||
$result = Yii::$app->runtimeCache->getOrSet(__METHOD__ . implode(',', $ids), function () use ($ids) {
|
||||
return $this->getQuery()->andWhere(['group_id' => $ids])->all();
|
||||
$query = $this->getQuery()->andWhere(['group_id' => $ids]);
|
||||
$cacheKey = __METHOD__ . sha1($query->createCommand()->getRawSql());
|
||||
$result = Yii::$app->runtimeCache->getOrSet($cacheKey, function () use ($query) {
|
||||
return $query->all();
|
||||
});
|
||||
|
||||
foreach ($result as $group) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user