Commit fc39a7c0 by Scott

Improve delete cache performance

Delete more files per AJAX request
parent 08963093
...@@ -543,7 +543,7 @@ function qa_recalc_perform_step(&$state) ...@@ -543,7 +543,7 @@ function qa_recalc_perform_step(&$state)
case 'docacheclear_process': case 'docacheclear_process':
$cacheDriver = Q2A_Storage_CacheFactory::getCacheDriver(); $cacheDriver = Q2A_Storage_CacheFactory::getCacheDriver();
$cacheStats = $cacheDriver->getStats(); $cacheStats = $cacheDriver->getStats();
$limit = min($cacheStats['files'], 20); $limit = min($cacheStats['files'], 500);
if ($cacheStats['files'] > 0 && $next <= $length) { if ($cacheStats['files'] > 0 && $next <= $length) {
$deleted = $cacheDriver->clear($limit, $next, ($operation === 'docachetrim_process')); $deleted = $cacheDriver->clear($limit, $next, ($operation === 'docachetrim_process'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment