Welcome Guest, Not a member yet? Register   Sign In
cache delete Phil Sturgeon
#1

[eluser]nani[/eluser]
Hi to all
i'm using Phil Sturgeon cache library.

I want to delete all the cache created in cache folder at once. how can i do this....

how to use the delete method for this.

i want to delete all cache or each folder in cache at once

please help me ......
#2

[eluser]InsiteFX[/eluser]
Read the CodeIgniter User Guide File_Helper and Directory_helper

InsiteFX
#3

[eluser]Valhallen[/eluser]
I have a similar question so I thought I'd hijack this thread for a sec

I'm using Phil's cache library to cache my models, but I don't get get how am I supposed to delete the cache later on. There's no methods in that lib for deleting particular model cache.

I guess I could use it this way:

$this->cache->write($data, 'cached-name');

because then I could use $this->cache->delete('cached-name');

but this way I'd have to write extra lines of code to check if the cache exists and then display it.
#4

[eluser]yabdab[/eluser]
I am just starting to use it, but it looks like you can simply set the request with a negative expire time.

Maybe Phil can confirm, but that is what it looks like will work.

Or you can just use the file methods to roll into that directory and wipe out all the folders/files.

Hope this helps.
#5

[eluser]tarciozemel[/eluser]
Just use:

Code:
$this->cache->delete_all();

Also it's possible create groups of files. Then you'll use the delete_group() function:

Code:
$this->cache->write($data, 'nav_title');
$this->cache->write($links, 'nav_links');
$this->cache->delete_group('nav_');




Theme © iAndrew 2016 - Forum software by © MyBB