• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI3 Hook Compression with CI4

#1
Question 
Any way to do this https://github.com/bcit-ci/CodeIgniter/w...TML-output

with CodeIgniter 4?

I need replace 

$CI =& get_instance();
$buffer = $CI->output->get_output();
$CI->output->set_output($buffer);
$CI->output->_display();

with CI4 settings  Blush
Reply

#2
Use an after filter: https://codeigniter4.github.io/userguide...er-filters

With:
CodeIgniter\HTTP\Message::getBody()
CodeIgniter\HTTP\Message::setBody()

From:
https://codeigniter4.github.io/userguide...ponse.html

Personally I just use efficient object caching (Redis) and HTTP caching (Varnish/Nginx) instead. If you don't test that enough, it can render your website unusable.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.