Don't refresh local app store repo on world change

Relates to #1508.
This commit is contained in:
altrisi authored and GitHub committed 2022-07-23 23:56:13 +02:00
1 parent 6215f83617
commit c08d857821
1 file changed
+5
@@ -59,6 +59,11 @@ public class AppStoreManager
{
@Override public String validate(CommandSourceStack source, CarpetRule<String> currentRule, String newValue, String stringInput)
{
if (newValue.equals(currentRule.value())) {
// Don't refresh the local repo if it's the same (world change), helps preventing hitting rate limits from github when
// getting suggestions. Pending is a way to invalidate the cache when it gets old, and investigating api usage further
return newValue;
}
APP_STORE_ROOT = StoreNode.folder(null, "");
if (newValue.equalsIgnoreCase("none"))
{