firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
209 stars 35 forks source link

unable to set "setPersistenceCacheSizeBytes" #332

Open luciofncnd opened 4 years ago

luciofncnd commented 4 years ago

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

alexames commented 4 years ago

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.

luciofncnd commented 4 years ago

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

alexames commented 4 years ago

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