• Resolved mojamba

    (@mojamba)


    I am curious what settings you recommend to ensure WPP works properly? I am new to LS Cache and previously WPP has worked with my other caching setups but with LS Cache it works for a while and then stops. When cache is purged it starts working again. I would think that the Ajax option for WPP would make things work fine but apparently not.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    May I know how did you add it ? like widget ? or shortcode or something ?

    Best regards,

    Thread Starter mojamba

    (@mojamba)

    I’m not 100% sure I understand your question but I am not referring to displaying the popular posts on my site. I am referring to actual post/page view data collection. When I view the stats I notice that they seem to track views accurately on and off. I am guessing that they work well after a purge but then seem to stop doing so after some period of time.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Yes , in order to help you , I would like to know how you insert it into your page

    Best regards,

    Thread Starter mojamba

    (@mojamba)

    I’m still not sure I follow. I just have the plugin enabled and the JS is included on my pages. I do use Autoptimize to combine JS files but that has never been an issue previously. It isn’t a question of whether the code works but rather how long it seems to work. And, while some of my sites do have a “popular” page using the shortcode, I don’t really care about whether that page is exactly up to date or not.

    Having said that, I have been discussing the issue with the WPP developer on the WPP support forums. I am looking into the idea that the nonce WPP uses, which expires based on the default 24 hours, is the issue since the LS Cache default TTL is 1 week. I will change that timeout to match the TTL and see what happens. I’ll report back when I know more.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Then could you please kindly ask them the nonce name they use ?

    We have ESI nonce to avoid such issue.

    Best regards,

    Thread Starter mojamba

    (@mojamba)

    I had known about ESI but didn’t realize there was a nonce option. That’s cool. I have asked the developer which nonce name to use. I notice in your latest version you added a wildcard option for that nonce feature so I think something like wpp* might do the job but I’ll let you know what specific name(s) he provides.

    Speaking of that, assuming that both approaches (changing nonce lifetime and ESI nonce) solve the issue, which would be preferred? I would think changing the lifetime would have a somewhat negative effect on security but wouldn’t affect server performance or page speed at all. I am not sure what kind of performance/speed hit ESI adds compared to default setup. Any opinion on the matter?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I would say use ESI nonce would be better solution.

    Regardless how you set nonce , page will be cached , and it may not sync up with WP nonce generation/expiration anyway , only way is you to reduce the cache TTL , which is not exactly a good solution in comparison with ESI , where ESI can make page keep cached and only re-generate the nonce in ESI subrequest

    Best regards,

    Thread Starter mojamba

    (@mojamba)

    Thanks. I heard back from him. He says “it’s the REST API -and not WPP- that validates the nonce whenever it receives a POST request.” Then he said that according to WP documentation that nonce should be wp_rest

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Try use

    wpp-*
    wpp_*

    in ESI nonce list

    Best regards,

    • This reply was modified 4 years, 9 months ago by qtwrk.
    Thread Starter mojamba

    (@mojamba)

    Thanks. I’ll give that a try.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Please let us know how it goes.

    Best regards,

    Thread Starter mojamba

    (@mojamba)

    It’s been a while, but here’s my update. As the WPP developer suggested, I needed to use wp_rest for the ESI nonce.

    wpp-*
    wpp_*

    may be necessary for implementing the widget or a shortcode but as I don’t rely on those I am not sure. For actual logging of the views, however the wp_rest nonce seems to work.

    On a related note, I noticed that there is a Cache REST API setting on the first tab of the cache settings page. Unfortunately, the documentation for that is quite sparse and I cannot understand what that actually does. I thought maybe it would be the solution instead of using an ESI nonce but when I tried it I didn’t see any difference.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Settings for WordPress Popular Posts (WPP)’ is closed to new replies.