As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I am looking to develop a good way to cache things from the database to make the app faster. Does anyone know some good strategies that will help me in caching data. I am doing research on the subject, but just wanted to get some other opinions about caching and see if there is anything that Kinvey does to help out on that front.
Ummm so after some research on the Kinvey documentation I found this: http://devcenter.kinvey.com/ios/guides/caching-offline
I feel kinda foolish now but if anyone is wondering Kinvey does support this.
C
Caroline
said
over 9 years ago
Haha, thanks Sean!
S
Sean Hoffman
said
over 9 years ago
On another note, does anyone know how the Kinvey caching works? Is the caching based off of the store that is used? Meaning if I create a new store the is automatically nothing cached for it?
thanks,
Sean
M
Mike
said
over 9 years ago
To use caching, you have to use the appropriately configured store, however the stores share a global cache per collection, so if you read with one store, another one with the same collection will be able to retrieve those results.
S
Sean Hoffman
said
over 9 years ago
Ok, what i am wondering is I have multiple stores being used to access data, most of the time each one of this stores accesses the same data. How will this work with Kinvey caching?
If I have a separate store for each will it cache things separately as well?
If that is not the case then will the cache keep track of which store uses which data? Or will it only keep track of the last call on that store?
Thanks,
Sean
M
Mike
said
over 9 years ago
Each store has a reference to the global cache. When caching is enabled, and results come back from the server those results are added to the cache or updated if those entities were in the cache. When the cache is read (depending on the store's policy) it will pull the latest results, regardless of which store object was used to write to the cache.
S
Sean Hoffman
said
over 9 years ago
Great it seems to be working as expected except one thing. For some reason the skip and limit modifiers do not seem to be working with the caching.
M
Mike
said
over 9 years ago
Can you provide an example of what you mean?
S
Sean Hoffman
said
over 9 years ago
I have the KCSAppdataStore set up working great right now where it will get 0 to 20 the first go around and then the next call will get 20 to 40 and the next will get 40 to 60. It works great and has been working great for some time. As soon as I switch it to the KCSCacheStore(spelling) when I get the first 20 it works fine. And the caching works great as well if I come back to that screen it will get the cached results fine but as soon as I try to get 20 to 40 of the objects it will get the cached results of 0 to 20 and redisplay them. So it seems like the cached results ignore the skip and limit modifiers on the query when it is checking and comparing cached results.
I have not updated Kinvey SDK in a bit so I will do that now and report back and let you know what is going on with it.
Sean Hoffman
I am looking to develop a good way to cache things from the database to make the app faster. Does anyone know some good strategies that will help me in caching data. I am doing research on the subject, but just wanted to get some other opinions about caching and see if there is anything that Kinvey does to help out on that front.
Thanks in Advance,
Sean