Improve cacheing

Caches domain/a and author.domain/a as the same page.
This commit is contained in:
Robin Malley 2021-07-28 00:39:04 +00:00
parent 3b6a631dc4
commit 3db891800b
2 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,7 @@ local stmnt_cache, stmnt_insert_cache, stmnt_dirty_cache
local oldconfigure = configure
function configure(...)
local cache = util.sqlassert(sql.open_memory())
ret.cache = cache -- Expose db for testing
--A cache table to store rendered pages that do not need to be
--rerendered. In theory this could OOM the program eventually and start
--swapping to disk. TODO: fixme

View File

@ -1,4 +1,4 @@
local sql = require("sqlite3")
local sql = require("lsqlite3")
local session = require("session")
local tags = require("tags")
@ -151,7 +151,6 @@ local function read_get(req)
table.insert(params,"pwd=" .. hashstr)
end
local cachestrparts = {
ps.host,
ps.path,
}
if #params > 0 then