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:
-
currentCache
CacheThe current active cache. Do not modify this cache!
-
nextCache
CacheThe cache to be populated.
-
reinstall
FunctionA 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:
-
currentVersion
StringThe current version.
-
latestVersion
StringThe version from check.
Returns:
Boolean: