diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-02-19 00:55:20 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-02-19 00:55:28 +0300 |
commit | 1324cfcfd4e144af3120ff93e43758c12eec93f4 (patch) | |
tree | 47ae0a25f0adbad3018c7e5ba10ac5a6e949fdd8 | |
parent | f7cfd20d567dda5e610ec9303071dd87f2847d0d (diff) |
Fixes #7195 Make code more efficient by only updating the numeric archive tables (blob tables don't have `done` flags)
-rw-r--r-- | core/DataAccess/ArchiveInvalidator.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/DataAccess/ArchiveInvalidator.php b/core/DataAccess/ArchiveInvalidator.php index 8ff0516f11..916d94991b 100644 --- a/core/DataAccess/ArchiveInvalidator.php +++ b/core/DataAccess/ArchiveInvalidator.php @@ -174,7 +174,12 @@ class ArchiveInvalidator { // In each table, invalidate day/week/month/year containing this date $archiveTables = ArchiveTableCreator::getTablesArchivesInstalled(); - foreach ($archiveTables as $table) { + + $archiveNumericTables = array_filter($archiveTables, function($name) { + return ArchiveTableCreator::getTypeFromTableName($name) == ArchiveTableCreator::NUMERIC_TABLE; + }); + + foreach ($archiveNumericTables as $table) { // Extract Y_m from table name $suffix = ArchiveTableCreator::getDateFromTableName($table); if (!isset($datesByMonth[$suffix])) { |