method getCachedModel documentation in bbn\Mvc

This will get the model as it is in cache if any and otherwise will save it in cache then return it

function(string $path, array $data, bbn\Mvc\Controller $ctrl, int $ttl = 10) { if (\is_null($data)) { $data = $this->data; } if ($route = $this->router->route(router::parse($path), 'model')) { $model = new Model($this->db, $route, $ctrl, $this); return $model->getFromCache($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 BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.