Skip to content

Commit 9d58eb4

Browse files
Enable static cache
1 parent 19e0967 commit 9d58eb4

File tree

5 files changed

+68
-3
lines changed

5 files changed

+68
-3
lines changed

.htaccess

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<IfModule mod_rewrite.c>
22
RewriteEngine on
33

4+
# Serve pages from static page cache
5+
RewriteCond %{DOCUMENT_ROOT}/site/cache/%{SERVER_NAME}/pages/%{REQUEST_URI}/index.html -f [NC]
6+
RewriteRule ^(.*) %{DOCUMENT_ROOT}/site/cache/%{SERVER_NAME}/pages/%{REQUEST_URI}/index.html [END]
7+
RewriteCond %{DOCUMENT_ROOT}/site/cache/%{SERVER_NAME}/pages/%{REQUEST_URI} -f [NC]
8+
RewriteRule ^(.*) %{DOCUMENT_ROOT}/site/cache/%{SERVER_NAME}/pages/%{REQUEST_URI} [END]
9+
410
# Serve files from public subfolder
511
RewriteCond %{HTTPS_HOST} ^bradshaws.guide$ [NC,OR]
612
RewriteCond %{REQUEST_URI} !^/public

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"require": {
3131
"getkirby/cms": "^4.0",
3232
"getkirby/geo": "^1.0",
33+
"getkirby/staticache": "^1.0",
3334
"sylvainjule/locator": "^1.0",
3435
"k-community/markdown-field": "dev-develop",
3536
"arnoson/kirby-vite": "^5.0"

composer.lock

+54-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content

site/config/config.bradshaws.guide.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<?php
22

33
return [
4-
"cache" => true,
4+
"cache" => [
5+
"pages" => [
6+
"active" => true,
7+
"type" => "static",
8+
],
9+
],
510
"debug" => false,
611
"url" => "https://bradshaws.guide",
712
"whoops" => false,

0 commit comments

Comments
 (0)