I am wondering if I can make this working with WP Super Cache:
I need to have user rating system which i built without plugins, and I really like WP Super Cache, but I have some problems.
I can’t figure out how to display right data when the content is cached.
So, if user votes on the post, vote count is the same until the cache refreshes automatically.
Any ideas to make this working properly? Maybe some solution like flushing the cache when the rating changes, or something like that?
I managed to resolve this by using wp_cache_post_change($post_id).
So, for all of you in need for similar solution, this is my code:
When user votes, the vote is registered by ajax post, and the function that registers it calls this one:
$GLOBALS["super_cache_enabled"]=1; /* in the documentation it says it may be necessary */
EDIT 1: I stumbled into this post, and it seems to be the same problem, and the same solution, but I couldn’t google it out, sorry for posting duplicate content 🙁
Viewing 1 replies (of 1 total)
The topic ‘Super cache and user ratings’ is closed to new replies.