Exclude "post view" from caching

This topic is: Resolved

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!

Tagged: ,

This topic contains 12 replies, has 6 voices, and was last updated by  smartsaver 1 year, 10 months ago.

  • Author
    Posts
  • #4835

    yaofong
    Member
    Post count: 22

    My site is running behind cloudflare, and server is using Nginx + FastCgi Cache without installing any caching plugin in wordpress.Therefore I will need to manually exclude the file from caching.

    The post view is not updated when user is viewing our post, probably they are receiving cached web page, may I know which file I need to exclude from caching in order for post view to work properly?

    • This topic was modified 2 years, 2 months ago by  yaofong.
    • This topic was modified 2 years, 2 months ago by  yaofong.
  • #4840

    Jacob
    Staff
    Post count: 2323

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4844

    yaofong
    Member
    Post count: 22

    Hi,

    Excluding the yt-simple-post-views-counter.php don’t work. And I can’t find a way to bypass FastCgi cache for that portion of code in theme-function.php.

    Is it possible to use ajax to count the post view? I saw some post view plugin is using Ajax, but I think it is not compatible with the theme’s post ranking.

  • #4859

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #4871

    yaofong
    Member
    Post count: 22

    Nope, it doesn’t help.

  • #4897

    Jacob
    Staff
    Post count: 2323

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #5013

    abnerss
    Member
    Post count: 1

    prediction for the post views counter ajax? 🙂


    Teciber / Brazil
    http://www.teciber.com/

  • #5033

    Jacob
    Staff
    Post count: 2323

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #6007

    credimusinc
    Member
    Post count: 6

    hi please i am a bit lost here.
    is the attachment the new plugin.
    don’t get where the custom function in child theme directory is.

  • #6026

    Jacob
    Staff
    Post count: 2323

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #6388

    credimusinc
    Member
    Post count: 6

    Thank you how do i clear all the views so i could start afresh. And it seems now the views are different depending on where a post is on the home page.

  • #6419

    Max
    Staff
    Post count: 3150

    Hey there, You must be logged in to view this reply!

    Login | Register | Forgot Password?

  • #6499

    smartsaver
    Member
    Post count: 45

    By using AJAX to do view counts, won’t it overload the server?

You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view the replies/answers, you must be logged in!