Project

General

Profile

Bug #5096 » cache.patch

Bram Thielemans, 29/06/2012 14:28

View differences:

php/lib/cache_implementations/no_cache/no_cache.class.php Wed Mar 07 16:38:46 2012 +0100 → php/lib/cache_implementations/no_cache/no_cache.class.php Fri Jun 29 14:14:46 2012 +0200
61 61
    {
62 62
        return true;
63 63
    }
64

  
65
    function delete_like($id) {
66
        return true;
67
    }
64 68
    
65 69
}
66 70
?>
71

  
php/lib/cache_implementations/session_cache/session_cache.class.php Wed Mar 07 16:38:46 2012 +0100 → php/lib/cache_implementations/session_cache/session_cache.class.php Fri Jun 29 14:14:46 2012 +0200
78 78
          return $application.$cache_type.'_'.$id1.'_'.$id2.'_'.$extra;
79 79
    }
80 80

  
81
    function delete_like($id) {
82
        $cache  = $_SESSION['cache'];
83
        if(empty($cache))
84
        {
85
            return;
86
        }
87
        foreach($caches as $cache_id => $cache_state)
88
        {
89
            if (strpos($cache_id, $id) !== false)
90
            {
91
                $_SESSION['cache'][$id] = false;
92
            }
93
        }
94
    }
95

  
81 96
}
82 97

  
83 98
?>
99

  
    (1-1/1)