Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter jarad.ronald

    (@jaradronald)

    Thanks for the info, Donncha. The “geolocation work” is done pre-PHP. My NGINX configuration parses the http header variable into $_SERVER[‘COUNTRY’] and from there geo-specific pages in my theme case based upon that variable. SO, it looks like I can make a single edit to wp-cache-phase1.php to get me where I need to be:

    105: $key = $blogcacheid . md5( $wp_cache_key );

    becomes

    105: $key = $_SERVER['COUNTRY'] . '-' . $blogcacheid . md5( $wp_cache_key );

    And things appear to fall into place. Instead of my homepage having a single cache file:

    /wp-content/cache/wp-cache-6c5d070c02d3ef4d2ef9f36372988f1a.html

    I now get variations:

    /wp-content/cache/wp-US-cache-6c5d070c02d3ef4d2ef9f36372988f1a.html
    /wp-content/cache/wp-CA-cache-6c5d070c02d3ef4d2ef9f36372988f1a.html
    /wp-content/cache/wp-GB-cache-6c5d070c02d3ef4d2ef9f36372988f1a.html

    I will read the developer documentation, but turning my ‘core modification’ into a plugin should be relatively simple.

Viewing 1 replies (of 1 total)