views:

830

answers:

3

Good morning readers,

I have a little problem with caching feature of CI. When i generate a view with data from database, the data are always the same until il manually delete all cache files.

Is there any way to delete / invalidate the cache ?

I tried to set the cache limit to 1 minute, but i didn't work.

Thanks for incoming answers.

A: 

Are you suuure something in the view changed? and you have:

$this->output->cache(1);

in the right function? (anywhere in the function)

The page should be refreshed after a minute.

Did you try clear your browser cache? (ctrl+f5)

mrinject
A: 

From the CodeIgniter documentation:

"If you no longer wish to cache a file you can remove the caching tag and it will no longer be refreshed when it expires. Note: Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you will need to manually delete it from your cache folder."

If you don't want any pages that originate from a specific controller to be cached at all, don't include the

$this->output->cache(n);

tag in any of its functions.

Colin
A: 

Once the cache expires, it should refresh the page with the latest data from the View. Did you ever get this fixed or finally see this occur?

montego