In my use-case, I do not want to cache a specific part of the Firebase Database at all in my Android app.
I have tried the following things:
1) This change is made in the Application class of my app.
FirebaseDatabase.getInstance().setPersistenceEnabled(false);
FirebaseDatabase.getInstance().getReference().child("point-To-Place-I-don't-wanna-cache").keepSynced(false);
2) Removed FirebaseDatabase.getInstance().setPersistenceEnabled();from the application class.
Put FirebaseDatabase.getInstance().getReference().child("point-To-Place-I-don't-wanna-cache").keepSynced(false);in the activity before database access.
3) A few more combinations of the above commands.
Nothing seemed to work.