xxsimoxx/codepotent-update-manager

Add transient for ClassicPress version to improve performance

xxsimoxx opened this issue · 2 comments

Description

Plugin page is loading slow when there are many plugins using Update Manager Client.

Context

In the Update Client get_latest_version_number() is called for every plugin.
Using a transient (even kept for less than a minute) will lead to just one remote request to https://api-v1.classicpress.net/upgrade/index.php

Nice catch. Matter of fact, I've got this in the next version already. :) I can't recall for sure, but, I believe I set it to 12 hours to mirror the core update timeframe. Thanks for creating the issue.

After further consideration, I've bumped the value down to 10 minutes. I can't think of any cases where a longer period will be useful. This will greatly improve performance for those using Update Manager to handle a larger number of plugins (and/or themes as of 2.0.0!) This has been implemented and will be released in version 2.0.0.