I want to cache listDocuments response for a given time like 1 hour to optimize appwrite function calls. How to do this. Is it supported natively or do I have to use other third party libraries?
TL;DR
There is no native support to cache listDocuments response with the Android SDK. You will need to manually implement a caching mechanism. One option is to use RoomDB, which is a library for local storage in Android. Another option is to modify the ARC library, which mimics RemoteConfig from Firebase and can be customized according to your needs.- You will have to manually write an implementation to cache these results on disk. Example: RoomDB.
- I've created a library that mimics RemoteConfig from Firebase but only looks for 2 attributes, similar to
key: valuestructure. You can use that if you have 2 attributes or maybe modify it according to your needs. Here it is: https://github.com/itznotabug/arc.
I'd suggest using RoomDB for managing a long list of docs. though.
Recommended threads
- Issues with uAuth
Hey everyone, is anyone experiencing 500 errors for the oauth flow starting today? Im in the fra region. My oauth flow used to work fine until today, now im get...
- Provider error when creating a function ...
- Roles Enum Limitation in Kotlin SDK
The createMembership method in the Appwrite Kotlin SDK now requires List<io.appwrite.enums.Roles> instead of List<String>, but the predefined Roles enum only co...