mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
KOPTInterface: Minor optimization when hashing the configurable status
Use a table & table.concat instead of individual concats. And then use that same table for every hash-related operation. (Nothing else uses the configurable hash function, otherwise I'd have limited the table shenanigans to the function itself).
This commit is contained in:
@@ -7,7 +7,7 @@ local lfs = require("libs/libkoreader-lfs")
|
||||
local logger = require("logger")
|
||||
|
||||
-- Date at which the last migration snippet was added
|
||||
local CURRENT_MIGRATION_DATE = 20210503
|
||||
local CURRENT_MIGRATION_DATE = 20210508
|
||||
|
||||
-- Retrieve the date of the previous migration, if any
|
||||
local last_migration_date = G_reader_settings:readSetting("last_migration_date", 0)
|
||||
@@ -209,9 +209,10 @@ if last_migration_date < 20210414 then
|
||||
end
|
||||
end
|
||||
|
||||
-- DocCache, migration to Persist, https://github.com/koreader/koreader/pull/7624
|
||||
if last_migration_date < 20210503 then
|
||||
logger.info("Performing one-time migration for 20210503")
|
||||
-- 20210503: DocCache, migration to Persist, https://github.com/koreader/koreader/pull/7624
|
||||
-- 20210508: DocCache, KOPTInterface hash fix, https://github.com/koreader/koreader/pull/7634
|
||||
if last_migration_date < 20210508 then
|
||||
logger.info("Performing one-time migration for 20210503 & 20210508")
|
||||
|
||||
local DocCache = require("document/doccache")
|
||||
DocCache:clearDiskCache()
|
||||
|
||||
Reference in New Issue
Block a user