firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

unable to set "setPersistenceCacheSizeBytes"

Open luciofncnd opened this issue 6 years ago • 3 comments

Hi, I'm unable to use the "setPersistenceCacheSizeBytes" for local storage. As stated in the docs it should apply to Database default instance: https://firebase.google.com/docs/reference/android/com/google/firebase/database/FirebaseDatabase#public-synchronized-void-setpersistencecachesizebytes-long-cachesizeinbytes

I'm trying with : FirebaseDatabase.DefaultInstance.setPersistenceCacheSizeBytes(10000000);

But Unity tells me: 'FirebaseDatabase' does not contain a definition for 'setPersistenceCacheSizeBytes' and no accessible extension method 'setPersistenceCacheSizeBytes' accepting a first argument of type 'FirebaseDatabase' could be found (are you missing a using directive or an assembly reference?)

Is there another way to set it ?

Can you help me out ?

Thanks in advance.

Unity editor version: Unity 2019.2.12f1 Firebase Unity SDK version: 6.70 Firebase plugins in use: DATABASE Platform you are using the Unity editor on : WINDOWS 10 Platform you are targeting: Android Scripting Runtime: MONO Net 4x

luciofncnd avatar Dec 02 '19 20:12 luciofncnd

Hi luciofncnd, it looks like you're right, there was an oversight and that function didn't get hooked up despite there being documentation for it. We'll try to get it fixed as soon as we can. We'll update this bug when it's fixed.

alexames avatar Dec 03 '19 21:12 alexames

ok, I understand. Is there another way to set the Cache Size ? What's the actual size if not changed ? Thanks in advance.

luciofncnd avatar Dec 06 '19 21:12 luciofncnd

Sorry for the late reply. The default cache size is 10MB.

alexames avatar Dec 11 '19 19:12 alexames