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.
What is difference between setting the cache policy in the store or the query
I
Igor
started a topic
about 9 years ago
My store is setup with `KCSStoreCachePolicy:@(KCSCachePolicyLocalFirst)`. Whenever I simply query on it, the completion block is executed in the main thread, but if I use `query cachePolicy:KCSCachePolicyLocalFirst` the completion block runs in a different thread. I'm doing a bunch of queries updating the UI in their completion block. Do I have to setup a store for each query?
1 Comment
M
Mike
said
about 9 years ago
Setting the cache policy as a store option means that policy will be used as the default for loads and queries. If you specify a different cache policy in a specific query message, that one will be used instead.
The thread that the callback is executed on probably depends on whether the request is fulfilled from the cache or the network, and you should not rely on the callbacks happening on an specific thread. In your case you should explicitly update the UI on the main thread.
Igor