diff --git a/frontend/apps/filemanager/filemanagermenu.lua b/frontend/apps/filemanager/filemanagermenu.lua index c33feaf03..4140f1514 100644 --- a/frontend/apps/filemanager/filemanagermenu.lua +++ b/frontend/apps/filemanager/filemanagermenu.lua @@ -442,17 +442,17 @@ function FileManagerMenu:setUpdateItemTable() }) table.insert(self.menu_items.developer_options.sub_item_table, { text_func = function() - if G_reader_settings:isTrue("use_cre_call_cache") + if G_reader_settings:nilOrTrue("use_cre_call_cache") and G_reader_settings:isTrue("use_cre_call_cache_log_stats") then return _("Enable CRE call cache (with stats)") end return _("Enable CRE call cache") end, checked_func = function() - return G_reader_settings:isTrue("use_cre_call_cache") + return G_reader_settings:nilOrTrue("use_cre_call_cache") end, callback = function() - G_reader_settings:flipNilOrFalse("use_cre_call_cache") + G_reader_settings:flipNilOrTrue("use_cre_call_cache") -- No need to show "This will take effect on next CRE book opening." -- as this menu is only accessible from file browser end, diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index d79b0d51b..c27b8fcf2 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -888,9 +888,11 @@ end -- either globally, or per page/pos for those whose result may depend on -- current page number or y-position. function CreDocument:setupCallCache() - if not G_reader_settings:isTrue("use_cre_call_cache") then - return -- call cache disabled + if not G_reader_settings:nilOrTrue("use_cre_call_cache") then + logger.dbg("CreDocument: not using cre call cache") + return end + logger.dbg("CreDocument: using cre call cache") local do_stats = G_reader_settings:isTrue("use_cre_call_cache_log_stats") -- Tune these when debugging local do_stats_include_not_cached = false @@ -1105,6 +1107,7 @@ function CreDocument:setupCallCache() elseif name:sub(1,3) == "set" then add_reset = true elseif name:sub(1,6) == "toggle" then add_reset = true elseif name:sub(1,6) == "update" then add_reset = true + elseif name:sub(1,6) == "enable" then add_reset = true elseif name == "zoomFont" then add_reset = true -- not used by koreader -- These may have crengine do native highlight or unhighlight