• Resolved spetsnax

    (@127001-1)


    Hello there,

    I have been using CometCache (previously ZenCache) for a while now. I’ve set my cache expiration time to 6 months because I do not update pages or content’s daily or some. But, there are some widgets in my sidebar, such as “Popular Posts Today” .. It lists and orders most popular posts in the box by view counts. And the cache mechanism surely caches it. At midnight, when I look to a post that was published earlier today, I see no posts in my popular posts widget. But I see a few when I’m logged in (helps viewing without cache) .

    1) So how can I get that kind of widgets work and update itself without caching? I can’t get them over ajax, as it would break my SEO process etc..

    2) I use ‘… ago’ type of datetime representation for the post’s publish time. In other words, when I publish a post and view it, I see ‘published 4 minutes ago’ word. So the page is cached with that and even you visit the post 5 days ago, you still see ‘4 minutes ago’ thing. I don’t know how can I fix these kind of issues

    https://ww.wp.xz.cn/plugins/comet-cache/

Viewing 1 replies (of 1 total)
  • 1) So how can I get that kind of widgets work and update itself without caching? I can’t get them over ajax, as it would break my SEO process etc..

    @127001-1 Unfortunately, you cannot. The only option would be to use a caching plugin that supports dynamic fragmentation, where specific portions of page are allowed to remain dynamic while the rest of the page is cached.

    There are all sorts of security implications with such a feature (I believe W3TC and/or WP Super Cache were affected by such issues and, if I’m not mistaken, disabled by default or removed that functionality at some point in the past).

    We have a Comet Cache feature request open for dynamic fragmentation that explains more of the technical details about why such a feature is difficult to implement properly. It’s still a feature we want to explore, but it’s not currently a high priority. I encourage you to leave a vote and/or comments on the feature request if you’re interested in seeing this in a future version of Comet Cache.

    2) I use ‘… ago’ type of datetime representation for the post’s publish time. In other words, when I publish a post and view it, I see ‘published 4 minutes ago’ word. So the page is cached with that and even you visit the post 5 days ago, you still see ‘4 minutes ago’ thing. I don’t know how can I fix these kind of issues

    This would also require dynamic fragmentation, as explained above. Another option in this case would be to set your cache expiration time to something lower, like 12 hours. Then at least the “XX time ago…” dates won’t be more than 12 hours off.

Viewing 1 replies (of 1 total)

The topic ‘Popular posts widget problem’ is closed to new replies.