- function getUserCounts()
- {
- $userCounts = User::cacheGet('sitemap:user:counts');
-
- if ($userCounts === false) {
-
- $user = new User();
-
- $user->selectAdd();
- $user->selectAdd('date(created) as regdate, count(*) as regcount');
- $user->groupBy('regdate');
-
- $user->find();
-
- $userCounts = array();
-
- while ($user->fetch()) {
- $userCounts[$user->regdate] = $user->regcount;
- }
-
- User::cacheSet('sitemap:user:counts', $userCounts);
- }
-
- return $userCounts;
- }
-
- function getNoticeCounts()
- {
- $noticeCounts = Notice::cacheGet('sitemap:notice:counts');
-
- if ($noticeCounts === false) {
-
- $notice = new Notice();
-
- $notice->selectAdd();
- $notice->selectAdd('date(created) as postdate, count(*) as postcount');
- $notice->groupBy('postdate');
-
- $notice->find();
-
- $noticeCounts = array();
-
- while ($notice->fetch()) {
- $noticeCounts[$notice->postdate] = $notice->postcount;
- }
-
- Notice::cacheSet('sitemap:notice:counts', $noticeCounts);
- }
-
- return $noticeCounts;
- }
-