Welcome Guest, Not a member yet? Register   Sign In
cache_delete() not working?
#1

[eluser]Lovecannon[/eluser]
Well, whenever I update my database, I try to delete the influenced query cache files, like such:
Code:
$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 >_>
#2

[eluser]Unknown[/eluser]
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.
#3

[eluser]Unknown[/eluser]
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.
#4

[eluser]iamjerson[/eluser]
Thanks a lot Chris i been it solves my problem too
#5

[eluser]Ehs4n[/eluser]
It solved my problem too. Thanks
#6

[eluser]pickupman[/eluser]
Count me in...just enabled DB caching and noticed cache files not being delete properly. Thanks.
#7

[eluser]er0k[/eluser]
[quote author="Chris Earl" date="1227514667"]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.[/quote]

Whew thanks for this!
#8

[eluser]Fuad Hassa[/eluser]
Thanks a lot... It saved my day... yes that should have be written in the user guide.
#9

[eluser]CroNiX[/eluser]
[quote author="Fuad Hassa" date="1335328636"]Thanks a lot... It saved my day... yes that should have be written in the user guide.[/quote]
No, it would be much better to fix it so the trailing slash isn't necessary and make it like all of the other CI directory variables.

You are also welcome to contribute to the codebase on github. Most devs don't read these forums and are rarely here.
#10

[eluser]Fuad Hassa[/eluser]
[quote author="CroNiX" date="1335330932"][quote author="Fuad Hassa" date="1335328636"]Thanks a lot... It saved my day... yes that should have be written in the user guide.[/quote]
No, it would be much better to fix it so the trailing slash isn't necessary and make it like all of the other CI directory variables.

You are also welcome to contribute to the codebase on github. Most devs don't read these forums and are rarely here.[/quote]

I agree




Theme © iAndrew 2016 - Forum software by © MyBB