Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use wp-postviews extention with Cache Enabler plugin? #34

Closed
hunty opened this issue Jan 18, 2018 · 1 comment
Closed

How to use wp-postviews extention with Cache Enabler plugin? #34

hunty opened this issue Jan 18, 2018 · 1 comment

Comments

@hunty
Copy link

hunty commented Jan 18, 2018

I installed wp-postviews on site with Cache Enabler plugin activated.
Using standard, not async code provided in Readme
caused common problem with not updating current views (as I expected - this page is rendered and written to cache).
The only way for now is to clear cache manually and decrease cache lifetime.
But I can see that you provided some async code using JS and LiteSpeed Cache:
jQuery.ajax({
type:"GET",
url:viewsCacheL10n.admin_ajax_url,
data:"postviews_id="+viewsCacheL10n.post_id+"&action=postviews",
cache:!1,
success:function(data) {
if(data) {
jQuery('#postviews_lscwp').html(data+' views');
}
}
});

but this code closely connected with LiteSpeed Cache plugin params.
I need more universal solution, that I can use with Cache Enabler plugin.
I will appreciate if you adivse me some solution or snippet.

@lesterchan
Copy link
Owner

I don’t use Cache Enabler plugin so I can’t help you on that. The LiteSpeed Cache code was provided to me by LiteSpeed devs, so I just included it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants