jaredatch / EA-Share-Count

A lean plugin that leverages SharedCount.com API to quickly retrieve, cache, and display various social sharing counts.
85 stars 13 forks source link

Add support for WP Async Task #4

Closed jaredatch closed 9 years ago

jaredatch commented 9 years ago

See https://github.com/techcrunch/wp-async-task

Currently if the script is used to pull share counts on a single post/page that only results in 1 API call to SharedCount which is negotiable on performance.

If the project requires using share counts on an archive page, in some instances if many caches go stale, then we end up with many API calls on page load which then noticeable slows down the page rendering (as reported by @billerickson).

The solution is to either add support for WP Async Task and enable it by default or add it and then use it via a filterable toggle switch.

billerickson commented 9 years ago

I actually think the issue is multiple calls to update_post_meta(), not necessarily multiple calls to their API, but either way this would fix the problem

jaredatch commented 9 years ago

Closing in favor of something simpler #11