Could you point a way to make a Codeigniter view have a very long timeout?

Eduardo Fuerte
Eduardo Fuerte used Ask the Experts™
on
Hi Experts

Could you point a way to make a Codeigniter view have a very long timeout?

This view maintains a dashboard open in a TV during a long time. This dashboard presents information from time to time by using code like:

 $.getJSON("survey_dashboard/get_totais", function (data) {
	$.each(data, function (g, grupo) {
		if (grupo.GRUPO == 'TOTAL') {
			total = grupo;
		} else if (grupo.GRUPO == 'ATIVO') {
			ativo = grupo;
		} else if (grupo.GRUPO == 'RECEPTIVO') {
			receptivo = grupo;
		} else if (grupo.GRUPO == 'VIVO') {
			vivo = grupo;
		}
	});

Open in new window


Where
survey_dashboard/get_totais

Open in new window


is a Controller function  that calls a SP

...
  public function get_totais() {

        $data = array();
        $data = $this->survey_model->new_get(array('query' => "CALL proc_pesquisa_totais()"));
        die(json_encode($data));
    }

Open in new window


Because an user first need to login the system to charge the dashboard-  this start countnig time,  after the timeout is reached the dashboard closes.

Does CI has a way to extend this time?

Thanks in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mukesh YadavFull Stack Developer

Commented:
Here are many things that can affect the response time like indexes on the table you are using in queries.
Eduardo FuerteDeveloper and Analyst

Author

Commented:
In this case the only relevant aspect is the view timeout. The dashboard must not be closed.

The time used by DB search has no influence, since the dashboard must to remain opened all the time.
Developer and Analyst
Commented:
The way I found is to solve was to mantain the CI controller outside the security structure, so the view it controls wouldn't suffer the timeout effect when the user stays for a long period logged in.
Eduardo FuerteDeveloper and Analyst

Author

Commented:
It's a matter of logic.
Simply doesn't maintain a view that couldn't be closed under security system.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial