Want to subscribe to topics you're interested in?
Become a Member

Wordpress re-enabling Redis Nginx level caching for mobile devices ?

Discussion in 'Blogs & CMS usage' started by adzkii, Apr 17, 2020.

  1. adzkii

    adzkii Member

    38
    1
    8
    Apr 15, 2020
    Ratings:
    +3
    Local Time:
    10:18 AM
    first launch of option 22, i had selected N for full page caching for mobile devices, how would i re-enable it?
    this guide shows how to disable it later on, but i need to the opposite

    cheers
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,183
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,926
    Local Time:
    7:18 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    To re-enable mobile cache you need to edit the include files for your selected wordpress caching include file

    where ${vhostname} is your domain.com name

    for keycdn cache enabler would be at /usr/local/nginx/conf/wpincludes/${vhostname}/wpcacheenabler_${vhostname}.conf so uncomment and add hash # in front of 2nd line and restart nginx + php-fpm so looks like below
    Code (Text):
        # exclude mobile devices from cache enabler caching
        #if ($cmwpcache_device = mobile) { set $cache_uri 'nullcache'; }
    

    for redis nginx level cache would be at /usr/local/nginx/conf/wpincludes/${vhostname}/rediscache_${vhostname}.conf so uncomment and add hash # in front of 2nd line and restart nginx + php-fpm so looks like below
    Code (Text):
    # exclude mobile devices from redis caching
    #if ($redis_device = mobile) { set $skip_cache 1; }
    

    for wp super cache there doesn't seem to be a mobile cache setup configured

    then restart Nginx and PHP services
    Code (Text):
    nprestart