Title: [Plugin: Quick Cache ( Speed Without Compromise )] QuickCache and GeoIP redirection
Last modified: August 20, 2016

---

# [Plugin: Quick Cache ( Speed Without Compromise )] QuickCache and GeoIP redirection

 *  [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * (@monkeypress)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-quick-cache-speed-without-compromise-quickcache-and-geoip-redirection/)
 * We have a rather large WordPress site (17,000+ pages) that could definitely use
   some QuickCache love. The site runs the WordPress Multilingual (WPML) plugin 
   to translate the site into 7 languages. When a user first comes to the site we
   make a GeoIP call to detect where they’re coming from in the world and then redirect
   them to the appropriate language for their location. WPML then sets an “_icl_current_language”
   cookie on their browser for the language they’re currently on. Since we need 
   to run this bit of code, we haven’t been able to use a caching plugin in the 
   past. Is there a way to hook into quick cache and make this call before it loads
   the cache file?
 * [http://wordpress.org/extend/plugins/quick-cache/](http://wordpress.org/extend/plugins/quick-cache/)

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

 *  [3×7](https://wordpress.org/support/users/3x7/)
 * (@3x7)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-quick-cache-speed-without-compromise-quickcache-and-geoip-redirection/#post-2927123)
 * +1
    I also use GeoIP redirection, but only on the main site within WPMU. It does
   not work with quick cache.
 * Possible solution would be to disable it for certain pages/sites.
 * Check I’m a plugin developer… section, at the bottom of the faq:
    [http://wordpress.org/extend/plugins/quick-cache/faq/](http://wordpress.org/extend/plugins/quick-cache/faq/)
 *  Thread Starter [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * (@monkeypress)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-quick-cache-speed-without-compromise-quickcache-and-geoip-redirection/#post-2927127)
 * I saw the part about being able to disable the plugin on a page by page basis.
   The downside to this is that our entire north america site would be un-cached.
   Overall the entire site can be cached minus this one little piece.
 * I’ll dig into the plugin code a bit and see if I can slide my GeoIP call in before
   QuickCache is activated. We set a session on the page once GeoIP picks a language
   so if that session doesn’t exist I could set that QUICK_CACHE_ALLOWED variable
   to false for the page. The next time the user sees a page they would get a cached
   version.
 *  Thread Starter [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * (@monkeypress)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-quick-cache-speed-without-compromise-quickcache-and-geoip-redirection/#post-2927129)
 * I think I might have figured this one out. I dropped the below block of code 
   into my wp-config.php file. If the language session variable isn’t set I simply
   disable quick cache. My theme function gets called and runs as usual to detect
   the users location. Then on the next request the user has their session set so
   my if statement would be ignored. It seems pretty simple, but I think it’ll get
   the job done.
 *     ```
       session_start();
       if (!$_SESSION['language'])
       {
       	@define ("QUICK_CACHE_ENABLED", "0");
       }
       ```
   
 *  [3×7](https://wordpress.org/support/users/3x7/)
 * (@3x7)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-quick-cache-speed-without-compromise-quickcache-and-geoip-redirection/#post-2927147)
 * I manged to make it work with different theme for redirection sites/main site

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

The topic ‘[Plugin: Quick Cache ( Speed Without Compromise )] QuickCache and GeoIP
redirection’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/quick-cache_efefef.svg)
 * [Quick Cache (Speed Without Compromise)](https://wordpress.org/plugins/quick-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quick-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quick-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/quick-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quick-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quick-cache/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [3×7](https://wordpress.org/support/users/3x7/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-quick-cache-speed-without-compromise-quickcache-and-geoip-redirection/#post-2927147)
 * Status: not resolved