latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

QuickCache – Exclude homepage

Home Forums Community Forum QuickCache – Exclude homepage

Tagged: 

This topic contains 6 replies, has 2 voices. Last updated by  scott devine 4 years, 2 months ago.

Topic Author Topic
Posted: Monday Oct 22nd, 2012 at 12:18 pm #29271

Hi there,

First off, congrats for your awesome work! I’m impressed! ;)

Next, I’m using QuickCache and I would like to prevent the homepege from being cached.
Can I do that by using a no-cache URI pattern or do I have to use the is_home_page function?

In either case, could you guide me through the process?

Thanks in advance for your assistance!

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Monday Oct 22nd, 2012 at 2:49 pm #29311
Raam Dev
Username: Raam
Staff Member

Hi Scott,

Please see the following from Dashboard -> QuickCache -> MD5 Version Salt:

Quick Cache can also be disabled temporarily. If you’re a plugin developer, you can define a special constant within your plugin to disable the cache engine at runtime, on a specific page, or in a specific scenario. In your PHP script, do this: define(“QUICK_CACHE_ALLOWED”, false). Quick Cache is also compatible with: $_SERVER[“QUICK_CACHE_ALLOWED”] = false, as well as define(“DONOTCACHEPAGE”, true), which is backward compatible with the WP Super Cache plugin.

Posted: Monday Oct 22nd, 2012 at 3:30 pm #29325

Hi Raam,

Thanks for your swift reply… but you’re over-estimating my skills.

I think I understand that it gives me the ability to write something along the lines of:

if is_home() { do_nothing();} or if !is_home() {do_your_stuff();}

… but that’s about it. No idea what and where to do it.

I don’t necessarily need an answer TODAY, but when you can find 5 mns to have a look at it and give me the piece of code to copy & paste, you’re most welcome! ;)

Posted: Tuesday Oct 23rd, 2012 at 12:39 pm #29416
Raam Dev
Username: Raam
Staff Member

Adding this to the top of your theme’s index.php file should do it:

<?php if(is_home()) { define(“QUICK_CACHE_ALLOWED”, false); } ?>
Posted: Tuesday Oct 23rd, 2012 at 4:57 pm #29453

Thanks, Raam,

I tried that –> no luck. So I put it earlier in the script, i.e. in wp_blog_header.php and with single quotes:

if ( !isset($wp_did_header) ) {
	$wp_did_header = true;
	require_once( dirname(__FILE__) . '/wp-load.php' );
	wp();
	require_once( ABSPATH . WPINC . '/template-loader.php' );
}

# Don't cache homepage
if(is_home()) { define('QUICK_CACHE_ALLOWED', false); }

Works a treat. Thanks again, Raaam.

Posted: Wednesday Oct 24th, 2012 at 2:01 pm #29545
Raam Dev
Username: Raam
Staff Member

Thanks for the update and for sharing the code sample, Scott! Glad to hear you got it working. :)

Posted: Thursday Oct 25th, 2012 at 4:12 am #29615

You’re most welcome, Sir! ;)
Hope this helps.

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.