Join the community 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:
    5:21 AM
    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

    48,514
    11,114
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,304
    Local Time:
    12:21 PM
    Nginx 1.21.x
    MariaDB 10.x