WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack Post Views
[resolved] Question about cached output (8 posts)

  1. Marcelo Pedra
    Member
    Posted 9 months ago #

    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/

  2. Steven Lambert
    Member
    Plugin Author

    Posted 9 months ago #

    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.

  3. Marcelo Pedra
    Member
    Posted 9 months ago #

    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

  4. Steven Lambert
    Member
    Plugin Author

    Posted 9 months ago #

    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.

  5. Steven Lambert
    Member
    Plugin Author

    Posted 9 months ago #

    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?

  6. Marcelo Pedra
    Member
    Posted 9 months ago #

    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?

  7. Steven Lambert
    Member
    Plugin Author

    Posted 9 months ago #

    I removed the cache, should work now.

  8. Marcelo Pedra
    Member
    Posted 9 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.