WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Question about cached output

[Resolved] Question about cached output

  • Marcelo Pedra
    Participant

    @kent-brockman

    Hello Steven, just a question: when the plugin is upgraded to the last version from yesterday, is it deleting its own cache? because my sites using the plugin begun showing an empty list. I switched the interval to “monthly” and it begun showing the right data again. then I switched back to “weekly” and it’s all ok now. This is an expected behaviour? or maybe one future update may trigger this issue again?

    http://wordpress.org/plugins/jetpack-post-views/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Steven Lambert
    Member

    @straker503

    The cache just uses the php SESSION to store the widget output while the user is viewing the site. I’m not sure why it would be showing an empty list, but just clicking save on the widget options will reset the cache. I’ll take a look into it, see if I can find something.

    Marcelo Pedra
    Participant

    @kent-brockman

    ok, try to get rid of PHP SESSION, it has caused conflicts with other plugins; search about “session” here:
    http://wordpress.org/plugins/si-contact-form/changelog/

    Just FYI, I’m using WP Super Cache, CDN enabled for use with Amazon Cloudfront. Maybe the empty list is a cache compatibility issue.

    Best regards

    Plugin Author Steven Lambert
    Member

    @straker503

    Ok, I thought using a named cache would remove any conflict issues, but I guess I should do some more digging. Thanks for the resource.

    Plugin Author Steven Lambert
    Member

    @straker503

    After some digging, I have found how to test if a session has already started or is allowed to be started, so it should help with any conflicts. But the question is this: should I still try to cache the widget output for better performance or should I just try to avoid SESSION altogether?

    Marcelo Pedra
    Participant

    @kent-brockman

    Good question. I’d say that if SESSION gives you a good result to store cached items, then do your best to detect any possible incompatibility and catch it from the code itself to prevent the script to trigger errors.
    🙂

    What else can you use if not SESSION? cookies? mysql cache?

    Plugin Author Steven Lambert
    Member

    @straker503

    I removed the cache, should work now.

    Marcelo Pedra
    Participant

    @kent-brockman

    I tested it now. The widget was seamlessley updated. Not blank views. Good job boy!!! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Question about cached output’ is closed to new replies.