Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ internal class DiskManager(
* size is stored in the preferences and returned otherwise.
*/
get() {
val requestedSize = diskBufferingConfig.maxCacheSize
val storedSize = preferences.retrieveInt(MAX_FOLDER_SIZE_KEY, -1)
if (storedSize > 0) {
if (storedSize == requestedSize) {
Log.d(
RumConstants.OTEL_RUM_LOG_TAG,
String.format("Returning max folder size from preferences: %s", storedSize),
)
return storedSize
}
val requestedSize = diskBufferingConfig.maxCacheSize
val availableCacheSize =
cacheStorage.ensureCacheSpaceAvailable(requestedSize.toLong()).toInt()
// Divides the available cache size by 3 (for each signal's folder) and then subtracts the
Expand Down
Loading