CodeIgniter Forums
page loads from cache even after deletions of cache files from cache folder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: page loads from cache even after deletions of cache files from cache folder (/thread-74748.html)



page loads from cache even after deletions of cache files from cache folder - vidiyalaakhilkumar_gmail.com - 11-01-2019

Hello

I have implemented page caching in a controller.
I have set timeout value for 5 min. Its working fine and the page is loading from cache till timeout.

The problem is if i delete the cache file manually from the cache folder before timeout and load the page, still the page is loading from cache. 

[Expected behavior is the page should load from DB]

Please help me out of this situation or any suggestions on why the behavior is so?

Thanks in Advance


RE: page loads from cache even after deletions of cache files from cache folder - fernaog - 11-01-2019

If you have the website hosted on a shared hosting or on your own server, you should check that a cache solution is not active. It could be Varnish or another.

Also sometimes web browsers store more than one would expect the cache of some parts of the CSS or JavaScript code. To clear this cache and refresh the page you use Shift + F5 in Chrome and Firefox I think it is Ctrl + F5

I hope it helps.


RE: page loads from cache even after deletions of cache files from cache folder - kilishan - 11-01-2019

If you have Opcache on in PHP it would do that also, I believe.


RE: page loads from cache even after deletions of cache files from cache folder - dave friend - 11-01-2019

(11-01-2019, 08:05 PM)kilishan Wrote: If you have Opcache on in PHP it would do that also, I believe.

Pretty sure Opcache only stores precompiled script bytecode and not output.


RE: page loads from cache even after deletions of cache files from cache folder - vidiyalaakhilkumar_gmail.com - 11-02-2019

[quote='kilishan' pid='369059' dateline='1572663956']
If you have Opcache on in PHP it would do that also, I believe.

I am new to codeignitor and PHP caching. I have checked in the phpinfo();

It is showing as "Opcache: Andi Gutmans, Zeev Suraski, Stanislav Malyshev, Dmitry Stogov, Xinchen Hui".
I also tried with "php_flag opcache.enable Off" in .htaccess file.

still the page is loading from cache.