The configuration to use.
The storage object.
Optional
getLocalIdOverride: () => stringDownloads information about available content types from the H5P Hub. This method will create a UUID to identify this site if required.
content types
Downloads the content type information from the H5P Hub and stores it in the storage object.
the downloaded (and saved) cache; undefined if it failed (e.g. because Hub was unreachable)
Returns the cache data.
(optional) The method only returns content type cache data for these machine names.
Cached hub data in a format in which the version objects are flattened into the main object,
Returns the date and time of the last update of the cache.
the date and time; undefined if the cache was never updated before.
Checks if the cache is not up to date anymore (update interval exceeded).
true if cache is outdated, false if not
If the running site has already been registered at the H5P hub, this method will return the UUID of it. If it hasn't been registered yet, it will do so and store the UUID in the storage object.
uuid
Checks if the interval between updates has been exceeded and updates the cache if necessary.
true if cache was updated, false if not
This class caches the information about the content types on the H5P Hub.
IT DOES NOT exactly correspond to the ContentTypeCache of the original PHP implementation, as it only caches the data (and converts it to a local format). It DOES NOT add information about locally installed libraries and user rights. ContentTypeInformationRepository is meant to do this.
Usage: