Join the community today
Become a Member

Xenforo xenforo redis installation

Discussion in 'Forum software usage' started by xenbiarritz, Aug 7, 2020.

Tags:
  1. xenbiarritz

    xenbiarritz Member

    42
    3
    8
    May 7, 2017
    Ratings:
    +4
    Local Time:
    1:48 PM
    hi
    i follow your guide here to install redis + xon addon
    Xenforo - Xenforo 2.1.0 Beta 1 Install & 2.1.0 Final Upgrade On Centmin Mod 123.09beta01 LEMP Stack

    i used your script
    Code:
    cd /svr-setup
    wget -O redis-install.sh https://github.com/centminmod/centminmod-redis/raw/master/redis-install.sh
    chmod +x redis-install.sh
    ./redis-install.sh install
    redis-cli --version
    Code:
    redis-cli 6.0.6
    
    then i copy/past
    add to Xenforo 2.1.0 src/config.php
    Code:
    $config['cookie']['prefix'] = 'xfa_';
    
    // https://xenforo.com/xf2-docs/manual/cache/
    // global cache
    $config['cache']['enabled'] = true;
    $config['cache']['namespace'] = 'xfaredis_';
    $config['cache']['provider'] = 'Redis';
    $config['cache']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'serializer' => 'igbinary',
    //  'password' => 'password',
    //  'timeout' => 0.0,
        'database' => 3,
    //  'persistent' => true,
    //  'persistent_id' => 'global'
    ];
    
    // session cache
    $config['cache']['sessions'] = true;
    
    // guest page cache
    $config['pageCache']['enabled'] = true;
    $config['pageCache']['lifetime'] = 900;
    $config['pageCache']['recordSessionActivity'] = true;
    $config['cache']['context']['page']['namespace'] = 'xfaredispagecache_';
    $config['cache']['context']['page']['provider'] = 'Redis';
    $config['cache']['context']['page']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'serializer' => 'igbinary',
        'database' => 5,
    //  'timeout' => 1,
    //  'persistent' => true
    ];
    
    // css cache
    // $config['css']['enabled'] = true;
    $config['cache']['context']['css']['provider'] = 'Redis';
    $config['cache']['context']['css']['namespace'] = 'xfarediscsscache_';
    $config['cache']['context']['css']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'serializer' => 'igbinary',
        'database' => 7,
    //  'timeout' => 1,
    //  'persistent' => true
    ];
    but it does not work
    if i use this
    Code:
    $config['cache']['enabled'] = true;
    $config['cache']['provider'] = 'SV\RedisCache\Redis';
    $config['cache']['config']  = array(
            'server' => '127.0.0.1',
            'port' => 6379,
            'compress_data' => 6,
        );
    it workes but i really want to use your code
    what can i do?

    thank you for your help
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,201
    10,280
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,934
    Local Time:
    9:48 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Don't use my code as Xenforo 2.1 native full page html cache is broken for some in that log out users get 304 status and see logged in user page mistakenly Guest page caching
     
  3. rdan

    rdan Well-Known Member

    4,983
    1,185
    113
    May 25, 2014
    Ratings:
    +1,804
    Local Time:
    7:48 PM
    Mainline
    10.2
    I think that only happens when using CF.
     
  4. xenbiarritz

    xenbiarritz Member

    42
    3
    8
    May 7, 2017
    Ratings:
    +4
    Local Time:
    1:48 PM
    Cf?