API Docs for:
Show:

UpdateImplementation Class

An object implementing methods to check for new version and update the activate cache.

Item Index

Methods

check

() Promise

Checks for a new version.

Returns:

Promise:

A promise resolving in the new version.

evolve

(
  • currentCache
  • nextCache
  • reinstall
)
Promise

Populate the updated cache.

Parameters:

  • currentCache Cache

    The current active cache. Do not modify this cache!

  • nextCache Cache

    The cache to be populated.

  • reinstall Function

    A 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

(
  • currentVersion
  • latestVersion
)
Boolean

Determines if the checked new version is actually a new version.

Parameters:

  • currentVersion String

    The current version.

  • latestVersion String

    The version from check.

Returns:

Boolean: