• Resolved dewinbrush

    (@dewinbrush)


    Hello, I just install Litespeed on WHM system and i started to use Cache functions. Almost %90 as i can say very good plugin however I have very strange problem which i can not solve the problem

    -Cache technology let’s say generally to stop or decrease Get/Post at serverside language like PHP at second time

    Meanwhile:

    I am using GEO IP detection
    If user comes from Japan: All pages show JAPAN flags, category order of post with shortode for JAPAN list and Japan bidirectioanl ACF fields from other custom posts

    summary if I flush cache, if first user check homepage, Japan flags, category list and materialsare shown. if second time user coming from Germany, same Japan pages shown.. In techonolgy this is not mistake and correct. However I have to solve his problem because if i disable Cache, TTFB dramaticaly incrased

    what can i do? is there anyone has idea?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    If your site uses cookie to store geolocation , please add this code into your .htaccess

    RewriteRule .* - [E=Cache-Vary:cookie_name]

    If your site use server-side geo ip module , then please check this wiki

    Best regards,

    Thread Starter dewinbrush

    (@dewinbrush)

    Honestly nor Cookie Neither Server-Side module i guess we can call it.

    Just I’m using GeoIP plugin to detect IP of customer with GeoLocation.MDB and I’m using different content for each geo loction countries with this variable

    <?php if (function_exists(‘geoip_detect2_get_info_from_current_ip’)) { ?>
    <?php $userInfo = geoip_detect2_get_info_from_current_ip(); ?>
    <?php if ($userInfo->country->isoCode == ‘AT’) { ?>
    <?php if( have_rows(‘austria_geo_target_deal’, $bonus->ID) ): ?>
    <?php while ( have_rows(‘austria_geo_target_deal’, $bonus->ID) ) : the_row(); ?>
    <?php if( get_row_layout() == ‘austria_geo_deal’ ): ?>
    <?php include( plugin_dir_path( __FILE__ ) . ‘frontpage_advert_list_compile.php’); ?>
    <?php else : ?>
    <?php include( plugin_dir_path( __FILE__ ) . ‘frontpage_advert_list_default.php’); ?>
    <?php endif; ?>
    <?php endwhile; ?>
    <?php else : ?>
    <?php include( plugin_dir_path( __FILE__ ) . ‘frontpage_advert_list_default.php’); ?>

    This reason Cache is just asking this request at php side and store it. After then when people comes from another countries, it is not working. last shown cached page bringing to other worldwide people. I tried to use htacces code which you send me at server-side part. its not working.

    Also I’m using Cloudflare. Also i disable it but didn’t change. I’M trying to understand and to find solution for it.

    Simply I’m using ACF and each country has different POST ORDER list at custom post types and each posts has different content or variables.

    Its like for example

    JAPAN has Different post order list / XYZ Brand comes as first at page, at INDIA, XYZ Brand comes as third one at list. Also COMMISION of item is for example %12 for JAPAN user and %10 for AUSTRIA user. This reason This PHP ACF IF/ELSE statements are working at background to bring specific fields for each post and each taxonomy part

    Thread Starter dewinbrush

    (@dewinbrush)

    Hello Again, some tuning and configuration at server-side part, Think now system seems working

    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CN|RU|TR|MT|DE|AT|AU|US|FR|IR|NL)$
    RewriteRule .* – [E=Cache-Control:vary=%{ENV:GEOIP_COUNTRY_CODE}]

    Just US not working because US has Subdivision STATE geolocation detection at background. I’m trying to configure subdivision part with country code at the same time.

    Sounds good, please keep post us if you have any problems.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘GEO CACHE’ is closed to new replies.