firebase / firebase/firebase-android-sdk

Clear Local Cache while persistenceEnabled is turned on

Open
#466 8 comments 12 reactions 0 assignees View on GitHub
api: database type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 23h
Merged PRs (30d)
34

Description

## What feature would you like to see?

A function to clear the local persistence Cache for realtime database and firestore when persistenceEnabled is turned on.

`FirbaseDatabase.getInstance().clearLocalCache()`

The functions should drop all rows in the SQL Database Cache and also clear the write-ahead-log file.

## How would you use it?

In our app, we are using user-specific database queries. When a user logging out and the other user is logged in. Anyone with root access to device storage can read personal data of a logged out user. We would clear the cache with every logout.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.