diff options
author | Yorhel <git@yorhel.nl> | 2020-01-24 16:29:51 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-02-06 11:02:58 +0100 |
commit | edd812bc90f9111b598efc9f4c25e26801767b20 (patch) | |
tree | 266886c3e212066e6851e2d189eb53e0e06fea16 /util/sql/schema.sql | |
parent | bc9bf70662fe35bcb4c6a89965d3b4f06bbbe783 (diff) |
Cache Markdown-to-HTML in the database for doc pages
Strips about 500ms off the page generation time for d11. The previous
in-memory cache kinda worked, too, but it still often happens that the
cache is empty.
This cache also applies for docs_hist, so browsing through earlier
revisions is now faster as well.
Diffstat (limited to 'util/sql/schema.sql')
-rw-r--r-- | util/sql/schema.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql index f2cc611c..4ac331c0 100644 --- a/util/sql/schema.sql +++ b/util/sql/schema.sql @@ -188,14 +188,16 @@ CREATE TABLE docs ( -- dbentry_type=d locked boolean NOT NULL DEFAULT FALSE, hidden boolean NOT NULL DEFAULT FALSE, title varchar(200) NOT NULL DEFAULT '', -- [pub] - content text NOT NULL DEFAULT '' -- [pub] + content text NOT NULL DEFAULT '', -- [pub] + html text -- cache, can be manually updated with util/update-docs-html-cache.pl ); -- docs_hist CREATE TABLE docs_hist ( chid integer NOT NULL PRIMARY KEY, title varchar(200) NOT NULL DEFAULT '', - content text NOT NULL DEFAULT '' + content text NOT NULL DEFAULT '', + html text -- cache ); -- login_throttle |