UpdateImplementation Class
An object implementing methods to check for new version and update the activate cache.
Item Index
Methods
Methods
check
()
PromiseChecks for a new version.
Returns:
Promise :
A promise resolving in the new version.
evolve
(
Promise
-
currentCache -
nextCache -
reinstall
Populate the updated cache.
Parameters:
-
currentCacheCacheThe current active cache. Do not modify this cache!
-
nextCacheCacheThe cache to be populated.
-
reinstallFunctionA function to trigger the prefetch process. Some update algorithms just want to prefetch again.
Returns:
Promise:
A promise resolving after finishing the update process.
If you simply wants to simply reinstall, return the value from reinstall
invocation.
isNewVersion
(
Boolean
-
currentVersion -
latestVersion
Determines if the checked new version is actually a new version.
Parameters:
-
currentVersionStringThe current version.
-
latestVersionStringThe version from check.
Returns:
Boolean:
