src/WPametu/DB/QueryBuilder.php
final protected function cache_query($sql, $result){
        if( isset($this->query_cache[$sql]) ){
            $this->query_cache[$sql] = $result;
        }elseif( count($this->query_cache) >= $this->cache_limit ){
            // Remove oldest cache
            array_shift($this->query_cache);
            // save query
            $this->query_cache[$sql] = $result;
        }
    }
final protected function cache_query($sql, $result){
        if( isset($this->query_cache[$sql]) ){
            $this->query_cache[$sql] = $result;
        }elseif( count($this->query_cache) >= $this->cache_limit ){
            // Remove oldest cache
            array_shift($this->query_cache);
            // save query
            $this->query_cache[$sql] = $result;
        }
    }
final protected function cache_query ( $ sql , $ result ) { if ( isset ( $ this -> query_cache [ $ sql ] ) ) { $ this -> query_cache [ $ sql ] = $ result ; } elseif ( count ( $ this -> query_cache ) >= $ this -> cache_limit ) { // Remove oldest cache array_shift ( $ this -> query_cache ) ; // save query $ this -> query_cache [ $ sql ] = $ result ; } }
Save query cache

@param string $sql
@param mixed $result
Save query cache