src/bbn/mvc.php
public function get_cached_model($path, array $data, mvc\controller $ctrl, $ttl = 10){
    if ( \is_null($data) ){
      $data = $this->data;
    }
    if ( $route = $this->router->route($path, 'model') ){
      $model = new mvc\model($this->db, $route, $ctrl, $this);
      return $model->get_from_cache($data, '', $ttl);
    }
    return [];
  }
public function get_cached_model($path, array $data, mvc\controller $ctrl, $ttl = 10){
    if ( \is_null($data) ){
      $data = $this->data;
    }
    if ( $route = $this->router->route($path, 'model') ){
      $model = new mvc\model($this->db, $route, $ctrl, $this);
      return $model->get_from_cache($data, '', $ttl);
    }
    return [];
  }
public function get_cached_model ( $ path , array $ data , mvc \ controller $ ctrl , $ ttl = 10 ) { if ( \ is_null ( $ data ) ) { $ data = $ this -> data ; } if ( $ route = $ this -> router -> route ( $ path , 'model' ) ) { $ model = new mvc \ model ( $ this -> db , $ route , $ ctrl , $ this ) ; return $ model -> get_from_cache ( $ data , '' , $ ttl ) ; } return [ ] ; }
This will get the model as it is in cache if any and otherwise will save it in cache then return it

@params string path to the model
@params array data to send to the model
@return array|false A data model
This will get the model as it is in cache if any and otherwise will save it in cache then return it