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

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11071 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-12-09 10:24:48 +00:00
parent 901def1d12
commit b56d98b66a
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));
}
}