from
fun <T> from(parentDirectory: File, filename: String, valueSerializer: CacheSerializer<T>): SnapshotFileCacheBuilder<T>
This is a convenience function to create a SnapshotFileCacheBuilder that uses an implementation of CacheSerializer to read and write to the cache File.
Parameters
parentDirectory
the directory to create and save the cache file in. On Android it is recommended to be somewhere in the cache directory such as Context.getCacheDir.
filename
this should be in the form of "com.example.module.feature". It is important for the filename to be unique across all Cache instances.
valueSerializer
an implementation of CacheSerializer