Skip to content

Commit b7d4b5f

Browse files
committed
Cache cover photos
1 parent 4e1bb40 commit b7d4b5f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

wcfsetup/install/files/lib/data/user/UserProfileList.class.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace wcf\data\user;
44

5+
use wcf\system\cache\runtime\FileRuntimeCache;
6+
57
/**
68
* Represents a list of user profiles.
79
*
@@ -59,5 +61,13 @@ public function readObjects()
5961
}
6062

6163
parent::readObjects();
64+
65+
$coverPhotoFileIDs = [];
66+
foreach ($this->objects as $object) {
67+
if ($object->coverPhotoFileID) {
68+
$coverPhotoFileIDs[] = $object->coverPhotoFileID;
69+
}
70+
}
71+
FileRuntimeCache::getInstance()->cacheObjectIDs($coverPhotoFileIDs);
6272
}
6373
}

0 commit comments

Comments
 (0)