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

Wordpress Disable mobile caching once enabled?

Discussion in 'Blogs & CMS usage' started by joshuah, Nov 23, 2017.

  1. joshuah

    joshuah Member

    121
    14
    18
    Apr 3, 2017
    Ratings:
    +17
    Local Time:
    8:04 PM
    Is it possible to disable the mobile caching once a website is setup under option 22?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,960
    6,918
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,419
    Local Time:
    7:04 PM
    Nginx 1.13.x
    MariaDB 5.5
    To disable 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 remove hash # in front of 2nd line and restart nginx + php-fpm so looks like below
    Code (Text):
        # exclude mobile devices from redis 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 remove 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
     
    • Informative Informative x 1