On Ubuntu apache web server, the caching system is disabled by default. It is recommended to leave it off, it can create conflicts where pages are out of sync from source, cache and end user browsers. Also given I use very low latency storage (Intel Optaine / 3DXpoint), the copying to the cache then sending to the user takes longer then just sending to the user directly from 3D-Xpoint. Plus the cache expires, having to reload everything, and next cloud is partially slow for updating the cache. =============================================================================================================================================================================================== If you want to continue, follow this guide:
sudo mkdir /opt/ramdisk
sudo mkdir /opt/ramdisk/apache2-cache-disk
tmpfs /opt/ramdisk/apache2-cache-disk tmpfs rw,nodev,nosuid,size=2G 0 0
# cache cleaning is done by htcacheclean, which can be configured in
# /etc/default/apache2
#
# For further information, see the comments in that file,
# /usr/share/doc/apache2/README.Debian, and the htcacheclean(8)
# man page.
# This path must be the same as the one in /etc/default/apache2
CacheRoot /opt/ramdisk/apache2-cache-disk
# This will also cache local documents. It usually makes more sense to
# put this into tCacheDefaultExpire 3600 the configuration for just one virtual host.
CacheEnable disk /
# The result of CacheDirLevels * CacheDirLength must not be higher than
# 20. Moreover, pay attention on file system limits. Some file systems
# do not support more than a certain number of inodes and
# subdirectories (e.g. 32000 for ext3)
CacheDirLevels 3
CacheDirLength 3
CacheDefaultExpire 604800
#(7 days | in seconds | 60 x 60 x 24 x 7)
CacheIgnoreCacheControl On
#Helps prevent browser caching by ignoring the browsers requests.
#tmpfs /opt/ramdisk/apache2-cache-disk tmpfs rw,nodev,nosuid,size=2G 0 0
https://www.serverlab.ca/tutorials/linux/web-servers-linux/improve-website-performance-by-enabling-caching-in-apache/
https://askubuntu.com/questions/296038/what-is-the-difference-between-tmpfs-and-ramfs#296043
https://unix.stackexchange.com/questions/66329/creating-a-ram-disk-on-linux
https://duckduckgo.com/?q=apache+load+mod&t=vivaldi&ia=web
https://tecadmin.net/how-to-enable-caching-in-apache/
https://httpd.apache.org/docs/2.4/caching.html
https://geekflare.com/disable-cache-in-browsers/
https://www.geeksforgeeks.org/disable-browser-caching-with-meta-html-tags/
https://httpd.apache.org/docs/2.4/mod/mod_file_cache.html
https://www.simplified.guide/apache/enable-disable-module
Date: July 21st 2024.