Part of the EllisLab Network
   
 
cache_delete() not working?
Posted: 22 February 2008 11:43 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  60
Joined  06-12-2007

Well, whenever I update my database, I try to delete the influenced query cache files, like such:

$this->db->cache_delete('news''index');
                
$this->db->cache_delete('news''article');
                
$this->db->cache_delete('welcome''index'); 

but it does nothing..it does not delete, the only that will delete it is cache_delete_all(), but I will probably have to write my own method for removing the cache files >_>

Profile
 
 
Posted: 23 November 2008 10:17 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  2
Joined  11-23-2008

I just came across this myself, I did not have a trailing forward slash in my “system\application\config\database.php” file:

This did not work:

$db[‘default’][‘cachedir’] = “dbCache”;

This did:

$db[‘default’][‘cachedir’] = “dbCache/”;

Thought I’d post this incase it helps anyone else in the future.

C.

Profile
 
 
Posted: 04 July 2009 09:05 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  36
Joined  03-07-2007

This should really be emphasized in the documentation for the db caching. I was stuck until i found this.

Works really well after that, though.

Profile
 
 
Posted: 18 September 2009 09:53 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  17
Joined  02-11-2009

Thanks a lot Chris i been it solves my problem too

 Signature 

http://www.findphilippineseminars.com (CI)
http://www.sportspickcenter.com (CI)
http://www.myweblancers.com/ (Wordpress)
http://www.botechnology.com/ (Joomla)

Profile
 
 
Posted: 22 February 2010 01:15 PM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  7
Joined  01-18-2008

It solved my problem too. Thanks

Profile
 
 
Posted: 25 March 2010 11:28 AM   [ Ignore ]   [ # 5 ]  
Lab Technician
RankRankRankRank
Total Posts:  1159
Joined  03-30-2009

Count me in…just enabled DB caching and noticed cache files not being delete properly. Thanks.

 Signature 

Useful CI Links
Base Controllers by Phil Sturgeon
Cache Library by Phil Sturgeon
Carabiner css/js management by tonydewan

Profile
 
 
Posted: 23 April 2010 01:20 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  2
Joined  08-26-2009
Chris Earl - 24 November 2008 03:17 AM

I just came across this myself, I did not have a trailing forward slash in my “system\application\config\database.php” file:

This did not work:

$db[‘default’][‘cachedir’] = “dbCache”;

This did:

$db[‘default’][‘cachedir’] = “dbCache/”;

Thought I’d post this incase it helps anyone else in the future.

C.

Whew thanks for this!

Profile