You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using version 4.1.1 ,if the redis server isn't running or can't be connected to, the call to _redisDatabase.KeyExists() in RegisterParentDependencyDefinition() throws an exception.
My config is as follows:
It looks like the method: Get(string cacheKey, DateTime absoluteExpiryDate, Func getData, string parentKey = null, CacheDependencyAction actionForDependency = CacheDependencyAction.ClearDependentItems) handles the cache not being available when checking for the item, it's the code that tries to update the dependencies that doesn't.
After playing with this some more, I think there are two situations to consider:
redis is not available when the application starts (or is recycled)
redis is temporarily unavailable while the application is running
Event 2 is more likely to occur and I don't want it to make my app throw an exception. When reading, it should treat it as if it's not cached. An error when writing is trickier - perhaps only this web app can't connect, and others are fine? What if this is a dependency clear - other apps may still be able to get old data from redis.
Issue raised by @pdonovan on Bitbucket 2016-04-19 and migrated to Github
The text was updated successfully, but these errors were encountered:
Using version 4.1.1 ,if the redis server isn't running or can't be connected to, the call to _redisDatabase.KeyExists() in RegisterParentDependencyDefinition() throws an exception.
My config is as follows:
It looks like the method: Get(string cacheKey, DateTime absoluteExpiryDate, Func getData, string parentKey = null, CacheDependencyAction actionForDependency = CacheDependencyAction.ClearDependentItems) handles the cache not being available when checking for the item, it's the code that tries to update the dependencies that doesn't.
After playing with this some more, I think there are two situations to consider:
Event 2 is more likely to occur and I don't want it to make my app throw an exception. When reading, it should treat it as if it's not cached. An error when writing is trickier - perhaps only this web app can't connect, and others are fine? What if this is a dependency clear - other apps may still be able to get old data from redis.
Issue raised by @pdonovan on Bitbucket 2016-04-19 and migrated to Github
The text was updated successfully, but these errors were encountered: