CodeIgniter Forums
how to use, apply cache library. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: how to use, apply cache library. (/showthread.php?tid=69931)



how to use, apply cache library. - jaysondotp - 01-31-2018

Hi Good Morning,

i have made, online stocks requisition system and it is used by 90 branches nationwide. so in this case, expect a lot of data loaded from database and i have insert, update, read and view data from the database.. and for now i have table like stocks, request, branches and so. one of the table i mentioned it has 80k line's of data and it is very heavy to load.

Sample:

in 80k data divided by 90 branch.  so every branch it has 889 lines of unique data more or less. and my problem is, i didn't use cache library.. so i need you guys to guide me in how to use cache library in a proper-way. Angel

Thanks..


RE: how to use, apply cache library. - php_rocs - 02-01-2018

@jaysondotp
I have some questions.
How fast are your queries (have you turned on profiler)? 80K is not a lot of records and your queries should be lighting fast - milliseconds at most - assuming that you are only pulling 889 records. If it is slow then there are other issues.

As far as your question...here are two links to assist you:
1. https://www.codeigniter.com/user_guide/database/query_builder.html?highlight=query%20cache#query-builder-caching
2. https://www.codeigniter.com/user_guide/database/caching.html?highlight=query%20cache