ProtectedaddAdd the provided imageId at the given resolution to the cache, indicating that it has already been downloaded and is available for use.
ProtectedgetChecks the cache Map for the existence of the requested image. If the requested image has already been loaded at the desired resolution or higher, then this method returns a status of "available", otherwise a status of "required" is returned.
Retrieve a full URL for a TMDB image asset. This method will return a string if
a suitable image asset already exists for the request, or if the method is being
called from a server context where the Image class is not available. Otherwise,
a TmdbImageCacheResult promise will be returned, which may or may not have its
placeholder property set. If set, this can be used while the promise itself is
pending.
Optionalsize: string | numberProtectedtoExtracts the TMDB image ID, and requested resolution, from the provided arguments.
Optionalsize: string | number
The TmdbImageCache provides a mechanism to keep track of image URLs that have been downloaded from TMDB at specific resolutions. This allows for a few tricks to be performed, such as:
Instances of this class can be made for whatever wacky purposes you can think up, but it is recommended to use the getTmdbImageCache utility method, which will always return the same singleton instance.