Cache database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Cache database (/showthread.php?tid=70632) |
Cache database - omid_student - 05-05-2018 Hi I use $this->db->cache_on for cache my query But when i execute query,it dont save query sometimes What is problem? RE: Cache database - php_rocs - 05-11-2018 (05-05-2018, 11:50 AM)omid_student Wrote: Hi Is it possible to see the code around this statement? It would allow us to better assess the issue or problem. RE: Cache database - omid_student - 05-12-2018 (05-11-2018, 08:42 AM)php_rocs Wrote:Yes(05-05-2018, 11:50 AM)omid_student Wrote: Hi Here: PHP Code: public function delete_cache_file($query,$segment_one = '', $segment_two = '') RE: Cache database - omid_student - 05-12-2018 (05-12-2018, 12:58 AM)omid_student Wrote:(05-11-2018, 08:42 AM)php_rocs Wrote:Yes(05-05-2018, 11:50 AM)omid_student Wrote: Hi Actually i get query string and md5 it and combine with segments and delete file RE: Cache database - php_rocs - 05-16-2018 @omid_student, Also, have you checked the CI/Apache log to see if there were error messages? I also noticed that you are suppressing errors "@unlink". Maybe for testing purposes you should not suppress errors. RE: Cache database - omid_student - 05-16-2018 (05-16-2018, 07:35 AM)php_rocs Wrote: @omid_student, Why log? My code have no error RE: Cache database - php_rocs - 05-16-2018 @omid_student, Maybe it threw a error/warning when it tried to delete the file but was unable to. RE: Cache database - omid_student - 05-16-2018 (05-16-2018, 01:12 PM)php_rocs Wrote: @omid_student, I can check file existing or not Or add @ before unlink RE: Cache database - php_rocs - 05-17-2018 (05-16-2018, 11:25 PM)omid_student Wrote:(05-16-2018, 01:12 PM)php_rocs Wrote: @omid_student, I would remove @ before unlink. I try not to suppress errors. This way the errors should be logged. RE: Cache database - omid_student - 05-17-2018 (05-17-2018, 11:02 AM)php_rocs Wrote:(05-16-2018, 11:25 PM)omid_student Wrote:(05-16-2018, 01:12 PM)php_rocs Wrote: @omid_student, Yes you are right |