Redis Cache By Xon

Redis Cache By Xon 2.17.2

No permission to download
Sorry, try this:

Code:
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'server' => '127.0.0.1',
'port' => xxxx,
'password' => 'xxxxxxxxxx'

'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
'persistent' => true,
);
 
Sorry, try this:

Code:
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'server' => '127.0.0.1',
'port' => xxxx,
'password' => 'xxxxxxxxxx'

'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
'persistent' => true,
);
Thank you already for your help but also don't work
 
Did you actually set up a password in redis? By default there is no password. If so, remove the password line. Also check the port where redis is running.

And did you install the latest version of the add-on?
 
  • Like
Reactions: Xon
White page

[Mon Oct 26 08:50:33.002731 2020] [proxy_fcgi:error] [pid 21325:tid 139714623244032] [client 95.216.157.238:6151] AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected end of file, expecting ')' in /home/xxxxxx/domains/xxxxxx.be/public_html/src/config.php on line 23PHP message: PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0PHP message: PHP Parse error: syntax error, unexpected end of file, expecting ')' in /home/xxxxxx/domains/xxxxxx.be/public_html/src/config.php on line 23PHP message: PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0'


#Redis by Xon
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'host' => '127.0.0.1',
'port' => 7001,
'password' => 'X',
'compress_data' => 1
The configuration needs to be valid php. You are missing a closing );

Just appending additional stuff will not fix that
 
Solved
Thanks @Abraham54

#Redis by Xon
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'server' => ' ',
'port' => 17060 ,
'password' => ' ',
'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
);
 
Hello,

Before ask, I really read all 20 pages from this thread :)

I have whole page cache for guest pages by LiteSpeed server with LScache addon, its work well.

What additional caching with Redis and this addon do I need to configure to work with LiteSpeed in tandem from this list?
  • css (do i need cache it together with LiteSpeed whole page cache?)
  • page (i think i dont need this since i have LScache)
  • registry (??? what is this?)
  • sessions
 
1607521188427-png.241650

Example of how the XF debug output is extended to add some very basic redis connection stats
 

You mentioned at https://xenforo.com/community/threads/what-caching-configurations-do-you-all-use.188581/post-1485061 that compression level can be set, is that via compress_data ?

so something like below for zstd compression with level 1 ? and for fast 1 = compress_data => -1

PHP:
$config['cache']['config']['compression_lib'] = 'zstd';

$config['cache']['namespace'] = 'xfaredis';
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
    'host' => '127.0.0.1',
    'port' => 6480,
    'timeout' => 2.0,
    'database' => 7,
    'compress_data' => 1
];
 
You mentioned at https://xenforo.com/community/threads/what-caching-configurations-do-you-all-use.188581/post-1485061 that compression level can be set, is that via compress_data ?
Correct.

So the full example is;

PHP:
$config['cache']['namespace'] = 'xfaredis';
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
    'host' => '127.0.0.1',
    'port' => 6480,
    'timeout' => 2.0,
    'database' => 7,
    'compression_lib' => 'zstd',
    'compress_data' => -1,
];
 
can you explain this a bit more for we noobs?

i currently have it set to null to pick first random (so it says in the comment).

is it advisable to change that to zstd and use [0] in the element choice?
 
can you explain this a bit more for we noobs?

i currently have it set to null to pick first random (so it says in the comment).

is it advisable to change that to zstd and use [0] in the element choice?

AFAIK, only can set zstd if you have zstd PHP extension installed which isn't installed by default by any control panel or LEMP/LAMP out of the box. Centmin Mod LEMP stack optionally supports it when the variable is enabled for
Code:
PHP_ZSTD='y'                # zstd php extension https://github.com/kjdev/php-ext-zstd

zstd PHP extension info
Code:
php --ri zstd

zstd

Zstd support => enabled
Extension Version => 0.9.0
Interface Version => 1.4.5
all PHP extensions loaded
Code:
php -m
[PHP Modules]
bcmath
brotli
bz2
calendar
Core
ctype
curl
date
dom
enchant
exif
FFI
fileinfo
filter
ftp
gd
geoip
gettext
gmp
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libxml
lz4
lzf
mailparse
mbstring
mcrypt
memcache
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
redis
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
timezonedb
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
zstd

[Zend Modules]
Zend OPcache

if you don't have zstd PHP extension installed and loaded, then don't set compress_lib to zstd

zstd compression is really awesome https://community.centminmod.com/th...d-vs-brotli-vs-pigz-vs-bzip2-vs-xz-etc.18669/ :D
 
AFAIK, only can set zstd if you have zstd PHP extension installed which isn't installed by default by any control panel or LEMP/LAMP out of the box. Centmin Mod LEMP stack optionally supports it when the variable is enabled for
Code:
PHP_ZSTD='y'                # zstd php extension https://github.com/kjdev/php-ext-zstd

zstd PHP extension info
Code:
php --ri zstd

zstd

Zstd support => enabled
Extension Version => 0.9.0
Interface Version => 1.4.5
all PHP extensions loaded
Code:
php -m
[PHP Modules]
bcmath
brotli
bz2
calendar
Core
ctype
curl
date
dom
enchant
exif
FFI
fileinfo
filter
ftp
gd
geoip
gettext
gmp
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libxml
lz4
lzf
mailparse
mbstring
mcrypt
memcache
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
redis
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
timezonedb
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
zstd

[Zend Modules]
Zend OPcache

if you don't have zstd PHP extension installed and loaded, then don't set compress_lib to zstd

zstd compression is really awesome https://community.centminmod.com/th...d-vs-brotli-vs-pigz-vs-bzip2-vs-xz-etc.18669/ :D
Why do you have brotli installed when Cloudflare already includes it?
 
Hello, do I need to change something in the config if there are 2 sites connected to Redis Cache on the same server?
 
Top Bottom