CodeIgniter Forums
How delete special db cache - 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 delete special db cache (/showthread.php?tid=80124)



How delete special db cache - omid_student - 09-16-2021

Hi
My Codeigniter version is 3
I cache some query with $this-db->cache
But the bad event is caches saved with segment and if I want to delete special query, I have to delete all cache
For example, I have a function for getting user info with id 1 or 2 or 3
I cache query for each user
When user 1 modify his profile, so I have to delete the cache for only user 1, not all cache
Please help me how to do it


RE: How delete special db cache - InsiteFX - 09-17-2021

The only thing you might try is the db delete that only deletes the cache for that page.

Not the delete all one.


RE: How delete special db cache - omid_student - 09-17-2021

(09-17-2021, 02:14 AM)InsiteFX Wrote: The only thing you might try is the db delete that only deletes the cache for that page.

Not the delete all one.

I know but I have many functions and I need only remove special function cache


RE: How delete special db cache - InsiteFX - 09-17-2021

You can not do it with the db cache, with the file cache you can name it and then delete it.
Sounds like it would be a good method to add to the db cache.


RE: How delete special db cache - omid_student - 09-17-2021

(09-17-2021, 05:06 AM)InsiteFX Wrote: You can not do it with the db cache, with the file cache you can name it and then delete it.
Sounds like it would be a good method to add to the db cache.

I want to use Redis instead of DB cache
But cannot install it on windows wamp
My PHP version is 7.4.2
Can you help me with it?


RE: How delete special db cache - ikesela - 09-17-2021

(09-17-2021, 05:34 AM)omid_student Wrote:
(09-17-2021, 05:06 AM)InsiteFX Wrote: You can not do it with the db cache, with the file cache you can name it and then delete it.
Sounds like it would be a good method to add to the db cache.

I want to use Redis instead of DB cache
But cannot install it on windows wamp
My PHP version is 7.4.2
Can you help me with it?

Try using laragon (laragon.org) , it come with redis server


RE: How delete special db cache - omid_student - 09-18-2021

(09-17-2021, 12:51 PM)ikesela Wrote:
(09-17-2021, 05:34 AM)omid_student Wrote:
(09-17-2021, 05:06 AM)InsiteFX Wrote: You can not do it with the db cache, with the file cache you can name it and then delete it.
Sounds like it would be a good method to add to the db cache.

I want to use Redis instead of DB cache
But cannot install it on windows wamp
My PHP version is 7.4.2
Can you help me with it?

Try using laragon (laragon.org) , it come with redis server
Thanks


RE: How delete special db cache - vicenteh - 10-04-2021

Ok, i understand now. Thank you very much for the information.