• Hi,

    I have been using Super Cache for a while now. I am on a VPS and my regular traffic levels are easily handled by my server. But at times a few posts of mine get dugg, and I’d like to enable WP-Cache only on those posts.

    Please add this as a feature similar in line to the Rejected URI’s. I’d like to enable WP-Cache only for specific posts which i’m expecting to be dugg.

    This is what I tried doing by editing wp cache phase 2 file :

    function wp_cache_is_rejected($uri) {
    	global $cache_rejected_uri;
    
    	if (strstr($uri, '/wp-admin/'))
    		return true; // we don't allow caching of wp-admin for security reasons
    	foreach ($cache_rejected_uri as $expr) {
    		if( preg_match( "~$expr~", $uri ) )
    			return false;
    	}
    	return true;
    }

    And then added the URI of my post into the rejected URI field in the admin. It partially works, It doesn’t cache the rest of the blog, but only half of the post is cached

Viewing 1 replies (of 1 total)
  • Thread Starter coolkarthik88

    (@coolkarthik88)

    Hi I’ve got the above to hack to work. I can now set only specifc posts to be cached using the above mentioned method.

    Please add it as a feature in the future releases..

Viewing 1 replies (of 1 total)
  • The topic ‘Feature Request : Cache Only Specific Posts’ is closed to new replies.