diff --git a/cache/src/main/java/dev/openrs2/cache/DiskStore.kt b/cache/src/main/java/dev/openrs2/cache/DiskStore.kt index c2164932..5be35573 100644 --- a/cache/src/main/java/dev/openrs2/cache/DiskStore.kt +++ b/cache/src/main/java/dev/openrs2/cache/DiskStore.kt @@ -16,6 +16,8 @@ import kotlin.math.min /** * A [Store] implementation compatible with the native `main_file_cache.dat2` * and `main_file_cache.idx*` format used by the client. + * + * This class is not thread safe. */ public class DiskStore private constructor( private val root: Path, diff --git a/cache/src/main/java/dev/openrs2/cache/FlatFileStore.kt b/cache/src/main/java/dev/openrs2/cache/FlatFileStore.kt index 0a4a9643..e2e314fe 100644 --- a/cache/src/main/java/dev/openrs2/cache/FlatFileStore.kt +++ b/cache/src/main/java/dev/openrs2/cache/FlatFileStore.kt @@ -14,6 +14,10 @@ import java.nio.file.Path * and groups as file system files. This format is much friendlier to * content-addressable version control systems, such as Git, than the native * format used by the client. + * + * Multiple read threads may use this class simultaneously. However, only a + * single thread may write at a time. Reads and writes must not happen + * simultaneously. */ public class FlatFileStore private constructor( private val root: Path,