Merge PR #1088 branch 'igorw/ticket/11199' into develop

* igorw/ticket/11199:
  [ticket/11199] Match cache purge container files against container_*
  [ticket/11199] Purge dumped container correctly on cache purge.
This commit is contained in:
Oleg Pudeyev 2012-11-15 09:07:41 -05:00
commit c30b38ba10
3 changed files with 3 additions and 3 deletions

View file

@ -214,7 +214,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
while (($entry = readdir($dir)) !== false) while (($entry = readdir($dir)) !== false)
{ {
if (strpos($entry, 'container') !== 0 && if (strpos($entry, 'container_') !== 0 &&
strpos($entry, 'sql_') !== 0 && strpos($entry, 'sql_') !== 0 &&
strpos($entry, 'data_') !== 0 && strpos($entry, 'data_') !== 0 &&
strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'ctpl_') !== 0 &&

View file

@ -162,7 +162,7 @@ abstract class phpbb_cache_driver_memory extends phpbb_cache_driver_base
while (($entry = readdir($dir)) !== false) while (($entry = readdir($dir)) !== false)
{ {
if (strpos($entry, 'container') !== 0 && if (strpos($entry, 'container_') !== 0 &&
strpos($entry, 'sql_') !== 0 && strpos($entry, 'sql_') !== 0 &&
strpos($entry, 'data_') !== 0 && strpos($entry, 'data_') !== 0 &&
strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'ctpl_') !== 0 &&

View file

@ -138,5 +138,5 @@ function phpbb_create_dumped_container_unless_debug(array $extensions, array $pa
function phpbb_container_filename($phpbb_root_path, $php_ext) function phpbb_container_filename($phpbb_root_path, $php_ext)
{ {
$filename = str_replace(array('/', '.'), array('slash', 'dot'), $phpbb_root_path); $filename = str_replace(array('/', '.'), array('slash', 'dot'), $phpbb_root_path);
return $phpbb_root_path . 'cache/' . $filename . '_container.' . $php_ext; return $phpbb_root_path . 'cache/container_' . $filename . '.' . $php_ext;
} }