Fastline
New Member
Hello Xon,
Hope you're doing well. So, recently, i had upgraded the server and running latest XF and while i upgraded the PHP to 8.3, i remembered about caching. A couple of years back, i talked to you regarding the caching options and i was using Memcache since then. However, this time, i have installed the Redis Cache and how the site works now, it is wonders!
Although due to lack of documentation and new to the caching thingy, i've a few question:
- Should i use compression with Redis? I'm aware or zlib, brotli, etc.
Here's my .htaccess and the site is working fine. But i'm not sure if i should make any kind of changes in the htaccess after installing the Redis Cache:
On the forums, i saw several configurations for the Redis and i'm interested to know about a few of the parameters listed below:
'timeout' => 2.5,
'persistent' => null,
'force_standalone' => false,
'connect_retries' => 1,
'read_timeout' => null,
'compress_data' => 1,
'lifetimelimit' => 2592000,
'compress_threshold' => 20480,
'compression_lib' => null, // dynamically select first of; snappy,lzf,l4z,gzip IF EMPTY/null
Regarding the compress_data parameter, some people have configured it as 6 (mostly) and 2. What these value mean exactly?
As always, Thank You for your excellent addons!
Hope you're doing well. So, recently, i had upgraded the server and running latest XF and while i upgraded the PHP to 8.3, i remembered about caching. A couple of years back, i talked to you regarding the caching options and i was using Memcache since then. However, this time, i have installed the Redis Cache and how the site works now, it is wonders!
Although due to lack of documentation and new to the caching thingy, i've a few question:
- Should i use compression with Redis? I'm aware or zlib, brotli, etc.
Here's my .htaccess and the site is working fine. But i'm not sure if i should make any kind of changes in the htaccess after installing the Redis Cache:
Code:
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default
<IfModule mod_rewrite.c>
RewriteEngine On
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to workaround HTTP Basic auth issues when using PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>
<ifModule mod_expires.c>
ExpiresActive On
############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresDefault "access plus 1 year"
</FilesMatch>
</ifModule>
- Should i configure and use Guest Page caching?
- Should i configure and use CSS caching?
- Should i configure and use Session caching?
On the forums, i saw several configurations for the Redis and i'm interested to know about a few of the parameters listed below:
'timeout' => 2.5,
'persistent' => null,
'force_standalone' => false,
'connect_retries' => 1,
'read_timeout' => null,
'compress_data' => 1,
'lifetimelimit' => 2592000,
'compress_threshold' => 20480,
'compression_lib' => null, // dynamically select first of; snappy,lzf,l4z,gzip IF EMPTY/null
Regarding the compress_data parameter, some people have configured it as 6 (mostly) and 2. What these value mean exactly?
As always, Thank You for your excellent addons!