function noticeCount() { $cacheKey = sprintf('file:notice-count:%d', $this->id); $count = self::cacheGet($cacheKey); if ($count === false) { $f2p = new File_to_post(); $f2p->file_id = $this->id; $count = $f2p->count(); self::cacheSet($cacheKey, $count); } return $count; }