Skip to content

Commit

Permalink
DocCache: Unbreak on !Linux platforms (#9566)
Browse files Browse the repository at this point in the history
Regression since #9529
Fix #9565
  • Loading branch information
NiLuJe committed Sep 27, 2022
1 parent 4d48b6e commit 2420557
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/document/doccache.lua
Expand Up @@ -15,7 +15,8 @@ local DHINTCOUNT = G_defaults:readSetting("DHINTCOUNT")
local function calcCacheMemSize()
local min = G_defaults:readSetting("DGLOBAL_CACHE_SIZE_MINIMUM")
local max = G_defaults:readSetting("DGLOBAL_CACHE_SIZE_MAXIMUM")
local calc = util.calcFreeMem() * (G_defaults:readSetting("DGLOBAL_CACHE_FREE_PROPORTION") or 0)
local memfree, _ = util.calcFreeMem() or 0, 0
local calc = memfree * G_defaults:readSetting("DGLOBAL_CACHE_FREE_PROPORTION")
return math.min(max, math.max(min, calc))
end
local doccache_size = calcCacheMemSize()
Expand Down

0 comments on commit 2420557

Please sign in to comment.