Sidehistorik
This is for sure not an excact exact science, but this is how I have settings - in generel It has brought first page view from 12 secs to 6 secs:
Kodeblok |
---|
#https://www.ionos.com/community/server-cloud-infrastructure/apache/configure-http-content-caching-in-apache-on-ubuntu-1604/
CacheQuickHandler off
CacheLock on
CacheLockPath /data/apache-cache
CacheLockMaxAge 5
CacheIgnoreHeaders Set-Cookie
#https://www.ryadel.com/en/apache-mod_cache-mod_cache_disk-web-site-caching-reverse-proxy/
CacheDisable /pages/editpage.action
CacheDisable /rest
SetOutputFilter CACHE
AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/rss+xml text/xml image/svg+xml image/jpeg image/jpg image/png
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=3024000, public"
</FilesMatch>
<Location /rest>
ExpiresActive On
Header set Cache-Control: "max-age=1, public"
</Location>
<Location /download>
ExpiresActive On
Header set Cache-Control: "max-age=86400, public"
</Location>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 30 seconds"
ExpiresByType text/html "access plus 15 days"
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpg "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
ExpiresByType text/js "access plus 1 months"
ExpiresByType text/javascript "access plus 1 months"
</IfModule>
#https://confluence.atlassian.com/conf59/configuring-apache-to-cache-static-content-via-mod_disk_cache-792499657.html
<IfModule mod_disk_cache.c>
# "/s" is where Confluence serves "static" stuff. Instruct Apache to cache it:
CacheEnable disk /s
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 2000000
CacheIgnoreHeaders Set-Cookie
CacheRoot "/data/apache-cache"
</IfModule> |