Moves SoftCache logs to the app

This commit is contained in:
Vitor Pamplona
2025-08-31 12:10:51 -04:00
parent ea7a2f3426
commit 5397e4e22e
2 changed files with 8 additions and 2 deletions

View File

@@ -2203,9 +2203,17 @@ object LocalCache : ILocalCache {
}
fun cleanMemory() {
Log.d("LargeCache", "Notes cleanup started. Current size: ${notes.size()}")
notes.cleanUp()
Log.d("LargeCache", "Notes cleanup completed. Remaining size: ${notes.size()}")
Log.d("LargeCache", "Addressables cleanup started. Current size: ${addressables.size()}")
addressables.cleanUp()
Log.d("LargeCache", "Addressables cleanup completed. Remaining size: ${addressables.size()}")
Log.d("LargeCache", "Users cleanup started. Current size: ${users.size()}")
users.cleanUp()
Log.d("LargeCache", "Users cleanup completed. Remaining size: ${users.size()}")
}
fun cleanObservers() {

View File

@@ -117,9 +117,7 @@ class LargeSoftCache<K, V> : CacheOperations<K, V> {
}
keysToRemove.forEach { key, value ->
cache.remove(key, value)
println("Cleaned up entry for key: $key (object was garbage collected)")
}
println("Cache cleanup completed. Remaining size: ${cache.size}")
}
override fun forEach(consumer: BiConsumer<K, V>) {