create

fun create(appContext: Context, cacheDir: File, config: VideoCacheConfig): VideoMediaCache?

Returns a VideoMediaCache backed by the SimpleCache at cacheDir, or null if SimpleCache construction fails (e.g. a stale directory lock left by a prior crash). If an instance for that absolute directory path already exists in this process, that instance is returned and config is ignored beyond the first call; this prevents a second SimpleCache from being constructed against the same directory (which would throw).

Parameters

appContext

Application context used to construct the StandaloneDatabaseProvider.

cacheDir

Directory that backs the SimpleCache. Created if it does not exist.

config

Cache configuration. Honored only on the first call for cacheDir.