Merge pull request #6525 from kumards/patch-2

Incorrect data being returned for nonexistent primitive datatypes
This commit is contained in:
Sébastien Ros 2016-03-03 12:15:50 -08:00
commit 074fa7974a

View File

@ -38,7 +38,7 @@ namespace Orchard.Redis.Caching {
public object Get<T>(string key) {
var json = Database.StringGet(GetLocalizedKey(key));
if(String.IsNullOrEmpty(json)) {
return default(T);
return null;
}
return JsonConvert.DeserializeObject<T>(json);
}