public static function findThreadsCount($id)
    {
        $cache = Podium::getInstance()->podiumCache->getElement('user.threadscount', $id);
        if ($cache === false) {
            $cache = (new Query)->from(Thread::tableName())->where(['author_id' => $id])->count();
            Podium::getInstance()->podiumCache->setElement('user.threadscount', $id, $cache);
        }
        return $cache;
    }
public static function findThreadsCount($id)
    {
        $cache = Podium::getInstance()->podiumCache->getElement('user.threadscount', $id);
        if ($cache === false) {
            $cache = (new Query)->from(Thread::tableName())->where(['author_id' => $id])->count();
            Podium::getInstance()->podiumCache->setElement('user.threadscount', $id, $cache);
        }
        return $cache;
    }
public static function findThreadsCount ( $ id ) { $ cache = Podium :: getInstance ( ) -> podiumCache -> getElement ( 'user.threadscount' , $ id ) ; if ( $ cache === false ) { $ cache = ( new Query ) -> from ( Thread :: tableName ( ) ) -> where ( [ 'author_id' => $ id ] ) -> count ( ) ; Podium :: getInstance ( ) -> podiumCache -> setElement ( 'user.threadscount' , $ id , $ cache ) ; } return $ cache ; }
Returns number of active threads added by user of given ID.
@param int $id
@return int
Returns number of active threads added by user of given ID .