src/DbManager.php
private function loadAssignments($userId)
    {
        if (!isset($this->_assignments[$userId])) {
            $query = (new Query)
                ->select('item_name')
                ->from($this->assignmentTable)
                ->where(['user_id' => $userId]);

            $this->_assignments[$userId] = $query->column($this->db);
        }
    }
private function loadAssignments($userId)
    {
        if (!isset($this->_assignments[$userId])) {
            $query = (new Query)
                ->select('item_name')
                ->from($this->assignmentTable)
                ->where(['user_id' => $userId]);

            $this->_assignments[$userId] = $query->column($this->db);
        }
    }
private function loadAssignments ( $ userId ) { if ( ! isset ( $ this -> _assignments [ $ userId ] ) ) { $ query = ( new Query ) -> select ( 'item_name' ) -> from ( $ this -> assignmentTable ) -> where ( [ 'user_id' => $ userId ] ) ; $ this -> _assignments [ $ userId ] = $ query -> column ( $ this -> db ) ; } }
Load data. If avaliable in memory, get from memory
If no, get from cache. If no avaliable, get from database.
Load data . If avaliable in memory get from memory If no get from cache . If no avaliable get from database .