From dc3e23c61970188360c862d68791402e9cd9f9e5 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Sun, 7 Apr 2024 12:24:17 +0300 Subject: [PATCH] add garden-cache doc --- README.md | 3 ++- src/page_renderer/api.clj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b2e428e..efe89a7 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ Java 8 or later. :head-tags [[:meta {:name "custom" :property "stuff"}]] :stylesheet-async "large-stuff.css" ; injects an async renderer(s) :script "/app.js" ; async by default - :garden-css [:h1 {:font-size :20px}] ; critical path css + :garden-css [:h1 {:font-size :20px}] ; critical path css (or just inline the whole thing) + :garden-css-cache? true ; uses simple-dimple memoize cache, so only lives in the lifecycle ; seo and meta :description "Like a notepad but cyberpunk" diff --git a/src/page_renderer/api.clj b/src/page_renderer/api.clj index 0883942..391ed80 100644 --- a/src/page_renderer/api.clj +++ b/src/page_renderer/api.clj @@ -24,7 +24,7 @@ Assets ^String :stylesheet-async - stylesheet filename, will be loaded asynchronously by script. ^String :garden-css - data structure for Garden CSS - ^Boolean :garden-css-cache? - should Garden CSS be cached. + ^Boolean :garden-css-cache? - should Garden CSS be cached. (default: false) ^String :script-sync - script name, will be loaded synchronously ^String :js-module - entry point for JS modules. If you prefer your scripts to be served as modules ^Boolean :skip-cachebusting? - will skip automatic cachebusting if set. Defaults to false.