-
Notifications
You must be signed in to change notification settings - Fork 50
Description
When calling CollectionDataProvider.fetchDataFromCache, If there are no objects in the cache matching the cache key, nil is returned for the object array (I might prefer an empty array), but more importantly, the cache key is not set on the provider, so even though you have a delegate listening to the data provider, it will not get notified of subsequent additions to the collection. Here's the sequence I'm doing:
collectionDataProvider = CollectionDataProvider<StoreItemPendingPurchase>()
collectionDataProvider.delegate = self
collectionDataProvider.fetchDataFromCache(withCacheKey: cacheKey)
This returns nil for the error and nil for the object array. And the data provider's cacheKey is still nil. If somewhere else in the app someone sets data on the same cacheKey, I don't find out about it because my data provider's cacheKey is still nil.
Is this expected? If there some way to set the cacheKey independently of using setData() or fetchDataFromCache()?