blog: add more comment on PostContentCache

Peter Cai 3 years ago
parent 2bd9b169f3
commit 1b42c65294
No known key found for this signature in database
GPG Key ID: 71F5FB4E4F3FD54F

@ -124,6 +124,16 @@ const CACHE_VERSION: &'static str = "0001";
// Cached version of rendered blog content HTMLs
// compiled from Markdown
// This is needed because
// (1) we have to extract some information from
// the Markdown source code before anyone
// visits, e.g. pictures it refers to (
// for whitelisting the cache URL)
// (2) Markdown parsing is slower than filling in
// HTML templates of the entire page. If these
// Markdown compilation results are cached,
// page generation can be very fast while still
// keeping some dynamic features available to us
#[derive(Serialize, Deserialize)]
pub struct PostContentCache {
// UUID of the original post