PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Posts are not cached, but pages are

Quick Cache Plugin. Speeds up WordPress®.

Posts are not cached, but pages are

Postby jacinta » September 6th, 2010, 7:35 pm

Hi there,
I first installed & turned on Quick Cache with the default settings, and then I added some settings like the google xml sitemap url and turned on debugging... but still the posts are not cached (or at least the source does not show the Quick Cache Report). I have the plugin wp-include calling a php file from the post content. I made a plain text/html post to test if the wp-include file was stopping it, but it still did not cache the post. Strangely all pages are cached ok. Plugins I have installed are eShop, Exec-php, Contact form7, Mailchimp, wp-cms post control (to stop revisions), wp-table reloaded, events calendar and various category plugins, If anyone can look at an example post, I'd be grateful, eg. http://ibooknewzealand.com/2010/all-new ... -ultimate/
Regards, Jacinta.
User avatar
jacinta
Registered User
Registered User
 
Posts: 4
Joined: September 6, 2010

Re: Posts are not cached, but pages are

Postby Jason Caldwell » September 7th, 2010, 3:38 pm

Hi Jacinta. Here are some things I would have a look at:

1. Are you logged into the site?
( Quick Cache does not serve cached pages to logged-in users )

2. Did you recently leave a comment on your site?
( Quick Cache considers a recent commenter, as a logged-in user )

3. Are you hosted by GoDaddy? If so, please take a look at this thread:
viewtopic.php?f=5&t=168&p=1700&hilit=godaddy#p1619
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Posts are not cached, but pages are

Postby jacinta » September 7th, 2010, 8:54 pm

Thanks Jason, however the answer is no to all of the above. I am well aware of the no-cache for logged users. Is there any other info I can give you?
User avatar
jacinta
Registered User
Registered User
 
Posts: 4
Joined: September 6, 2010

Re: Posts are not cached, but pages are

Postby jacinta » September 7th, 2010, 9:37 pm

Through a process of elimination I've found that Quick Cache works with this code:
`<?php echo do_shortcode( '[contact-form 1 "Contact form 1"]' ); ?>`
but it does not work with this code:
`<?php echo do_shortcode('[eshop_addtocart]'); ?>`
Both reference a database table so I'm not sure why the incompatibility.
This page does not have the eShop cart code:
http://ibooknewzealand.com/2010/rotorua-thermals/
Whilst every other post does have it and is not being cached.
Any thoughts Jason ?
User avatar
jacinta
Registered User
Registered User
 
Posts: 4
Joined: September 6, 2010

Re: Posts are not cached, but pages are

Postby Jason Caldwell » September 8th, 2010, 12:40 am

Gotchya. Thanks for the additional details.
~ Much appreciated.

Inside the /eshop/cart-functions.php file, I find this:
Code: Select all
if (!function_exists('eshop_cache')) {
    function eshop_cache(){
        global $eshopoptions;
          if(!defined('DONOTCACHEPAGE') && $eshopoptions['set_cacheability']=='yes'){
              //wpsupercache
            define("DONOTCACHEPAGE", "true");
        }
    }
}
 

In other words, this particular plugin ( based on your configuration ) could be telling Quick Cache that it should NOT cache the page, and it is most likely doing this for a good reason ( i.e. perhaps it's not compatible with caching plugins under certain circumstances? ).

It also looks like this is a configurable eShop option. So you might take a look in your Dashboard and/or in their forums to see what the implications of disabling this are.

Please report back if this helps, doesn't help?
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Posts are not cached, but pages are

Postby jacinta » September 8th, 2010, 8:27 pm

Ah got it - you're right about the setting for eshop which I'd set to "Yes, cache all pages with checkouts & shortcodes". Of course you want the checkout pages not cached, but I used a specific shortcode on each post (as above), so I have now disabled the function in eshop and all the posts are now cached. If anyone has the same situation, the code is below (eshop_shortcodes.php). Thanks a million Jason - really proves that 2 heads are better than 1 ! - Mark this as closed.
Code: Select all
`function eshop_addtocart($atts){global $wpdb, $post;
/*DELETED THIS LINE SO THAT PAGES WOULD BE CACHED   eshop_cache();*/
   extract(shortcode_atts(array('hide'=>''), $atts));`
User avatar
jacinta
Registered User
Registered User
 
Posts: 4
Joined: September 6, 2010

Re: Posts are not cached, but pages are

Postby Jason Caldwell » September 28th, 2010, 12:08 pm

@Resolved.
Thanks for reporting back on this.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to Quick Cache Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron