let memoizedFunc (input : 'a) =
// check if there is a cached result for this input
match cache.TryGetValue(input) with
| true, x -> x
| false, _ ->
// evaluate and add result to cache
let result = f input
cache.Add(input, result)
result`
cache is initialized (ie not null) and input, result are also not null.
Darkseid.dll!Darkseid.Utils.Utils.memoizedFunc@53<string,Amazon.CloudWatch.Model.Dimension[]>.Invoke(string input) Line 53 F#
Darkseid.dll!Darkseid.VirmanVundabar.TrackSuccessfulSend(string shardId, int payloadSize) Line 155 F#
Darkseid.dll!<StartupCode$Darkseid>.$[email protected](Darkseid.Model.InternalModel.Result<Amazon.Kinesis.Model.PutRecordResponse,System.Exception> _arg1) Line 197 F#
[External Code]
This was originally happening with the current nuget package (v0.2.0). I got the source and included it into my project to get a better handle on where it's going wrong.