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™

re-cache on comment?

Quick Cache Plugin. Speeds up WordPress®.

re-cache on comment?

Postby dozarte » July 27th, 2010, 2:00 pm

Is there a way to auto refresh a page cache when a user submits a comment?
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby Jason Caldwell » July 28th, 2010, 2:49 am

Hi Dozarte. Thanks for the great question.

Actually, Quick Cache already handles this gracefully.

In your WP Dashboard, see: Quick Cache - Options:

Don't Cache Pages For Logged In Users?
It is best to leave this set to True at all times. Most visitors are NOT logged in, so this does not hurt performance at all. Also, this setting includes some users who AREN'T actually logged into the system, but who HAVE authored comments recently. This way comment authors will be able to see updates to the spool immediately. In other words, Quick Cache thinks of a comment author as a logged in user, even though technically they are not.
~ 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: re-cache on comment?

Postby dozarte » July 28th, 2010, 6:43 am

mmhh... This does not solve my problem...
On this page I can see a comment just if I'm logged in; can you see it, since you can't login?
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby Jason Caldwell » July 30th, 2010, 9:37 am

I see the comment box, but it says " No Comments ".

If you continue to have problems, you might also want to verify that your theme is configured to display existing comments to everyone. Normally, these routines are found inside:
/wp-content/[your theme]/comments.php
~ 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: re-cache on comment?

Postby dozarte » July 30th, 2010, 10:08 am

Everything is ok on my theme.
Oh well... it's not a matter of life or death, so... I'm giving up!
;P
Never mind!
Thank you anyway!!
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby Jason Caldwell » August 4th, 2010, 10:16 pm

Very welcome.
~ Sorry to hear that.

If you have a chance, please feel free to elaborate on this topic.
Maybe I didn't understand the problem exactly?

On this page I can see a comment just if I'm logged in; can you see it, since you can't login?
~ 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: re-cache on comment?

Postby dozarte » August 19th, 2010, 12:45 am

I simply think the plugin does not rebulit the cache of a page when a user submit a comment.
If that user can see a 'refreshed' page, other users can not.
Am I right?
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby Jason Caldwell » August 24th, 2010, 9:17 am

I simply think the plugin does not rebulit the cache of a page when a user submit a comment.
If that user can see a 'refreshed' page, other users can not.
Am I right?

Yes, you are correct. The person who left the Comment will be able to see the updated spool ( with their comment ), and anyone else who has previously commented on your site will also see those changes immediately. s2Member does not cache pages for logged-in users. That being said, s2Member considers anyone who has commented recently, a "logged-in user", even though technically they're not.

* Note.. Quick Cache does NOT rebuild the cache each time, so public visitors who are not logged in, or have not left comments recently, will NOT see comment updates until the cache expires, which is usually an hour later. This is the intended behavior.
~ 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: re-cache on comment?

Postby dozarte » August 24th, 2010, 9:39 am

Thank you Jason, you were clear!

I think this could be a problem just if someone has a not often updated blog, like mine; I set up cache expires to 9999999! (my fault, I know)
I only think could be nice some 'update on comment' feature.

Anyway - as said - great plugin!
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby Jason Caldwell » August 24th, 2010, 9:47 am

Thanks for reporting back on this. I'll add this to our TODO list for Quick Cache.

@TODO :: possible option in the back-end panel for Rebuild-On-Comment.
~ 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: re-cache on comment?

Postby dozarte » March 17th, 2011, 1:11 am

Jason Caldwell wrote:@TODO :: possible option in the back-end panel for Rebuild-On-Comment.


Please remember this "to do" ;)
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby catalyst » March 19th, 2011, 1:43 pm

I found a solution but after testing with several versions of wordpress and quick cache, to me only works with wordpress 3.0.4 + Quick Cache 2.2.7, and the solution is:

add this in yout theme functions:


Code: Select all
    add_filter("comment_post_redirect", "ws_plugin__qcache_clear_on_post_page_comment", 10, 2);
    function ws_plugin__qcache_clear_on_post_page_comment($location, $comment) {
       ws_plugin__qcache_clear_on_post_page_creations_deletions($comment->comment_post_ID);
       return $location;
    }




then go to:

wp-content/plugins/quick-cache/includes/functions/clearing-routines.inc.php

and in line 32

replace with this:
Code: Select all
    if (in_array ($pagenow, ($pages = array ("edit.php", "post.php", "post-new.php", "wp-comments-post.php"))))




and you are done. again to me only works in WP 3.0.4 + QC 2.2.7
User avatar
catalyst
Registered User
Registered User
 
Posts: 5
Joined: March 7, 2011

Re: re-cache on comment?

Postby jcspain » March 25th, 2011, 6:30 pm

Hi Jason,

"Re-cache on comment" is the only thing I miss in this plugin. I want to set a high value in "Cache expires" because once published a post, rarely changes, so rebuilding it's not necessary. But if I set this high value, appears the same problem described by dozarte: users not logged in can't see new messages until the end of the "Cache expires" period. Please consider implementing this feature in next version.

Thank you!
User avatar
jcspain
Registered User
Registered User
 
Posts: 1
Joined: March 25, 2011

Re: re-cache on comment?

Postby dozarte » March 26th, 2011, 1:08 am

I'm happy I'm not alone ;)
User avatar
dozarte
Registered User
Registered User
 
Posts: 33
Joined: July 24, 2010

Re: re-cache on comment?

Postby fozzzo » March 26th, 2011, 4:28 pm

Hi, I've just registered to say that I would also like to see this option, i.e. "Re-cache on comment". For me it looks better if comments are considered as page update, i.e. that page's cache is reset and rebuilt for only that page/post (like when you update the page/post).

If we have this option I would set cache to much higher value, at the moment I cannot do that, because I am getting comments occasionally and current settings wouldn't be friendly for the post that is getting comments. And the truth is, if your site has 50 pages for example, you are getting comments on very few... and all other pages suffer in speed since you cannot set higher cache value because of these few posts.

I'm aware that those posts can be dismissed with Quick cache options, but those are posts with most traffic and would be nice to have them cached. I am actually getting just a couple of comments daily and automatic re-caching would work perfectly for me.

The other solution could be different caching for posts and pages.

Btw, big thank you for the plugin, I like it more than other cache options for WP.
User avatar
fozzzo
Registered User
Registered User
 
Posts: 1
Joined: March 26, 2011

Re: re-cache on comment?

Postby ovidiu » April 15th, 2011, 3:00 am

I second this request.
I would very much like a page's cache to be cleared after a comment is submitted.
User avatar
ovidiu
Registered User
Registered User
 
Posts: 8
Joined: April 15, 2011

Re: re-cache on comment?

Postby Paul030 » April 19th, 2011, 4:20 am

Agreed - this would make this caching plugin perfect. You could essentially cache for weeks if comments invalidated the cache for individual posts.

Is it that hard to add this feature?

Has anyone patched the plugin to provide this feature? Or is an update in the works?
User avatar
Paul030
Registered User
Registered User
 
Posts: 6
Joined: April 19, 2011


Return to Quick Cache Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron