Textstem has a built in cache which will generate static snapshots of pages. To enable the cache, set the enabled option to true in the textstemapp config.
Cache Strategy
Textstem supports two approach to caching
1. "private" - which involves creating static html files which Wrangler will use rather than rendering out all the components.
2. "public" - which involves creating static html files for wrangler pages. These pages are stored then the "page-cache" directory in the public folder using a directory structure that corresponds to the page url. You can then update your htaccess with the following to redirect requests to these pages (without ever hitting the app):
RewriteCond %{REQUEST_URI} ^/?$
RewriteCond %{DOCUMENT_ROOT}/page-cache/__INDEX__.html -f
RewriteRule .? page-cache/__INDEX__.html [L]
RewriteCond %{DOCUMENT_ROOT}/page-cache%{REQUEST_URI}.html -f
RewriteRule . page-cache%{REQUEST_URI}.html [L]