I agree it is different. But we can do local relays on Android. So, to me the question really is what is the DB that the local relay is using and how to make that relay load from disk as fast as possible. Sure, the apps will still have their own cache, but it can be an in-memory only cache. If the relay is fast, the apps don't need do manage any event storage by themselves.

Replies (2)

The in-memory caches are not evictable, so it’s doing a shittier job that the OS could be doing automatically.
But they are. Java has a gargabe collector that knows way more than the OS does and can optimize for when to call it. Then the two objects you use are WeakReference and SoftReference, Weak is used to tell the GC to clear as soon as no one else is using this object and Soft indicates that the GC should leave the object in memory and only clear on memory contention.