Welcome Guest, Not a member yet? Register   Sign In
Db caching and cache_delete_all()
#1

[eluser]ariok[/eluser]
hi all!

During a short experience with codeigniter caching query system, i found this big problem:
if i use caching_delete_all() it remove directly the cache directory.. and not the directory created into it.

This is a problem because if i use again caching after delete this dir ... i get an error (i try to write into a non existant directory)

could someone help me ?
#2

[eluser]ariok[/eluser]
From system/database/DB_cache.php
Code:
function delete_all()

    {
    delete_files($this->CI->db->cachedir, [b]TRUE[/b]);
    }


The problem is the TRUE value.. it say to file function to delete also the main directory.

This is a big problem when i don't know which pages could generate caching.

example: if i need to cache authentication for groups.
I have a function auth() in my authenticate library... and this function check if some groups of a user have access to a page.

The Auth() function is placed in all private pages.. and so it generate X dirs in my cache dir
example, private+page1, private+page2 etc..
So it would be really useful delete all these directories when i update groups.
#3

[eluser]barbazul[/eluser]
I recall a similar bug being reported when query caching was first released.

Not sure if it got fixed though




Theme © iAndrew 2016 - Forum software by © MyBB