// Remove unused $tables property from ObjectModel + improve Cache

This commit is contained in:
rMalie
2011-12-09 10:24:48 +00:00
parent 091025371e
commit 2daf87f506
16 changed files with 24 additions and 43 deletions
+11 -1
View File
@@ -314,6 +314,16 @@ abstract class CacheCore
public static function clean($key)
{
unset(Cache::$local[$key]);
if (strpos($key, '*'))
{
$regexp = str_replace('\\*', '.*', preg_quote($key, '#'));
foreach (array_keys(Cache::$local) as $key)
if (preg_match('#^'.$regexp.'$#', $key))
unset(Cache::$local[$key]);
}
else
unset(Cache::$local[$key]);
d(array_keys(Cache::$local));
}
}