I’ve a scenario where we need to request for 4 years worth of data. I’ve managed to hook up the enterprise library with in memory cache.
Problem is it takes ages to request for 4 years data and store locally. Alternative is to request for 1 year data and another 3 years subsequently as needed and add on local cache.
Could someone help me with how we can add data on to existing cached data and also how to update keys for the cache?
Enterprise Library doesn’t and can’t know how to append data to your object. To do this you will need to get the object from the cache, add the new data to the object and add the object back to the cache with the same key. The existing cached object will be replaced with the new one. It would look something like the following code.