A JavaScript framework called Codeigniter offers a library to assist you with common JavaScript functions that you might need. The following line may be executed in any controller method to enable caching. $this->output->cache('$n');