Dec 20, 2011 at 8:04 AM
Edited Dec 21, 2011 at 7:36 AM
This is a bug.
There is a method: Formatters.Serialization.BinaryDeSerialize<T>(byte serializedObject), it changes byte to T.
When we get nothing from the cache, the method will get null and can not change it to T, so we get the error.
We can modify the method by add follow codes at the starting line:
if (serializedObject == null) return default(T);
Or we can ensure the msg.Payload is not null before BinaryDeSerialize. For example:
In IndexusSharedCacheProvider.cs there is a method: RegexGet(string regularExpression),
we can change if(CacheUtil.Get(msg)) to if(CacheUtil.Get(msg) && msg.Payload != null).
You can have a try.