• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$this->db->cache_delete('controller', '*');

#3
[eluser]Pascal Kriete[/eluser]
It doesn't currently accept anything of the sort, but it shouldn't be too hard to write a helper that does it.

Something along these lines. Untested (so be careful!):
Code:
// Cache files are stored as segment1+segment2, so construct your pattern accordingly
function regex_purge_db_cache($pattern)
{    
    $CI =& get_instance();
    $CI->load->helper('file');
    
    $pattern = $CI->db->cachedir.$pattern;
    
    $paths = glob($pattern, GLOB_ONLYDIR|GLOB_NOSORT|GLOB_MARK);
    
    foreach($paths as $path)
    {
        delete_files($path, TRUE);
    }
}


Messages In This Thread
$this->db->cache_delete('controller', '*'); - by El Forum - 01-01-2009, 08:36 AM
$this->db->cache_delete('controller', '*'); - by El Forum - 01-01-2009, 08:30 PM
$this->db->cache_delete('controller', '*'); - by El Forum - 01-02-2009, 06:49 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.