anchor.diff:              | Metadata
   
           ///Gets the argument type for a given type
  -        let getArgumentType (parameter : ParameterInfo) = 
  +        let getArgumentType  = 
  +
  +            let cache = ConcurrentDictionary<ParameterInfo, ArgumentType> ()
  +
  +            let add (parameter : ParameterInfo) =
               
  -            let summary = 
  -                getTypeSummary parameter.ParameterType
  -
  -            if (isUnit summary.BaseType) then
  -
  -                Unit'
  -
  -            else if (isType<OperationMetadata> summary.BaseType) then
  -
  -                if summary.IsOptional then
  -                    invalidSetup "Optional OperationMetadata is not supported."
  -
  -                Metadata
  -
  -            else if (summary.BaseType.IsValueType || isType<String> summary.BaseType) then
  -
  -                Parameter (parameter.Name, summary.IsOptional, summary.BaseType)
  -
  -            else
  -
  -                Message (summary.IsOptional, summary.BaseType)
  +                let summary = getTypeSummary parameter.ParameterType
  +
  +                if (isUnit summary.BaseType) then
  +
  +                    Unit'
  +
  +                else if (isType<OperationMetadata> summary.BaseType) then
  +
  +                    if summary.IsOptional then
  +                        invalidSetup "Optional OperationMetadata is not supported."
  +
  +                    Metadata
  +
  +                else if (summary.BaseType.IsValueType || isType<String> summary.BaseType) then
  +
  +                    Parameter (parameter.Name, summary.IsOptional, summary.BaseType)
  +
  +                else
  +
  +                    Message (summary.IsOptional, summary.BaseType)
  +
  +            fun parameter ->
  +                cache.GetOrAdd (parameter, add)
   
           ///Gets the argument types for a given method
           let getArgumentTypes (method' : MethodInfo) = 
  
positive.code:             | Result
  
          ///Gets the return type of a method
          let getReturnType (method' : MethodInfo) = 
                      
              let returnType = 
                  match (AsyncSupport.getAsyncReturnType method'.ReturnType) with
                  | Some type' -> type'
                  | _ -> method'.ReturnType
              
              let summary = 
                  getTypeSummary returnType
  
              if (isUnit summary.BaseType) then
                  
                  Void
  
              else if (isType<OperationResult> summary.BaseType) then
  
                  if summary.IsOptional then
                      invalidSetup "Optional OperationResult is not supported."
  
                  Result
  
              else
  
                  Resource (summary.IsOptional, summary.BaseType)
  
          ///Gets the invoke method for a function type
          let getFunctionInvokeMethod (type' : Type) = 
  
negative.code: ﻿namespace Slumber
  
  open System
  open System.Collections.Concurrent
  open Slumber.Framework
  
  ///Contains functions for generating Slumber configuration in a fluent style
  