CodeIgniter Forums
CI Determines there is a Valid Cache File, and Exits Early? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CI Determines there is a Valid Cache File, and Exits Early? (/showthread.php?tid=2656)



CI Determines there is a Valid Cache File, and Exits Early? - El Forum - 08-16-2007

[eluser]Vik[/eluser]
I'm a CI newbie. I have a text input form with a submit button that submits to a function called "search."

It appears that the first time I run it, the data is submitted to my search function correctly.

But after that, the following code in CodeIgniter.php, determines that there is a valid cache file, and exits, so that my search function isn't called:
Code:
* ------------------------------------------------------
*    Is there a valid cache file?  If so, we're done...
* ------------------------------------------------------
*/

if ($EXT->_call_hook('cache_override') === FALSE)
{
    if ($OUT->_display_cache($CFG, $RTR) == TRUE)
    {
        exit;
    }
}

What can I look into in order to fix this? Thanks in advance to all for any info.


CI Determines there is a Valid Cache File, and Exits Early? - El Forum - 08-16-2007

[eluser]Michael Wales[/eluser]
That code is only called if you have implemented the caching.

If you haven't done that - we can work on figuring out why it's not working correctly. The first thing I'd want to see is changing your search method to do nothing more than send the query to the view - and the view just echo. Is the text echo'd into the view changing? If so, it's working properly.

A full log file would help as well.


CI Determines there is a Valid Cache File, and Exits Early? - El Forum - 08-16-2007

[eluser]Vik[/eluser]
Thank you very much! I deleted the cache files, and that seems to have fixed it.


CI Determines there is a Valid Cache File, and Exits Early? - El Forum - 08-16-2007

[eluser]Michael Wales[/eluser]
Do they keep getting created or are you good now? Did you have page caching enabled at the time?


CI Determines there is a Valid Cache File, and Exits Early? - El Forum - 08-16-2007

[eluser]Vik[/eluser]
It's all good now. Smile It was enabled at the time. After I disabled it, I still had to delete the cache files to get things working.

Thanks very much for the advice.