Learn about Centmin Mod LEMP Stack today
Become a Member

Wordpress How to bypass ( exclude ) wordpress homepage from redis cache

Discussion in 'Blogs & CMS usage' started by heliomedia.ro, Nov 14, 2021.

  1. heliomedia.ro

    heliomedia.ro New Member

    2
    0
    1
    Nov 14, 2021
    Romania
    Ratings:
    +0
    Local Time:
    8:45 PM
    Hi there,

    I am trying to exclude ( bypass ) the wordpress homepage of a site from cache in redis.

    I was trying to edit the configuration file adding this code:


    if ($request_uri ~* "/index|/index\.html") {
    set $skip_cache 1;
    }

    into this:

    in /usr/local/nginx/conf/wpincludes/myDomain.com/rediscache_myDomain.com.conf

    but it is not working, the front page it is still loading from the cache.

    Can anyone suggest how to resolve this ?

    I mention that the code above it is working to exclude ( bypass ) other urls than the index homepage.

    10x!
     
  2. eva2000

    eva2000 Administrator Staff Member

    50,476
    11,663
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,088
    Local Time:
    3:45 AM
    Nginx 1.25.x
    MariaDB 10.x