CodeIgniter Forums
Database Caching (only a specific entry) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Database Caching (only a specific entry) (/showthread.php?tid=63731)



Database Caching (only a specific entry) - DevotionGeo - 12-03-2015

Hi Everyone,

In one of my applications I have thousands of users registered. I want to use CodeIgniter's database caching to speed things up.
I need a type of functionality that if some user updates his profile information, only the query pointing to his profile info delete from the cache not all the queries pointing to all users' profiles.

I read the user_guide and it gives an example of how to delete certain files from cache as,
Code:
$this->db->cache_delete('blog', 'comments');
, but the problem is that the example will delete all of the comments, not for example a comment related to some user.

In this type of scenario, (deleting only certain user's cache, who recently updated his profile, so that his/her cache is re-generated, or deleting only comments by a certain user, or comments by all users on certain post), the codeigniter's database cache isn't enough.

What will be the solution for this kind of functionality?

Thank you.