diff --git a/doc/api/api.chm b/doc/api/api.chm index f9b4aed..0b9a254 100644 Binary files a/doc/api/api.chm and b/doc/api/api.chm differ diff --git a/src/ExpressiveAnnotations.MvcUnobtrusive/Caching/MapCache.cs b/src/ExpressiveAnnotations.MvcUnobtrusive/Caching/MapCache.cs index 6e320f6..19b3d24 100644 --- a/src/ExpressiveAnnotations.MvcUnobtrusive/Caching/MapCache.cs +++ b/src/ExpressiveAnnotations.MvcUnobtrusive/Caching/MapCache.cs @@ -14,7 +14,7 @@ namespace ExpressiveAnnotations.MvcUnobtrusive.Caching /// internal static class MapCache // http://stackoverflow.com/q/3037203/270315 { - private static readonly ConcurrentDictionary> _cache = new ConcurrentDictionary>(); // why lazy? -> http://stackoverflow.com/q/12611167/270315, https://blogs.endjin.com/2015/10/using-lazy-and-concurrentdictionary-to-ensure-a-thread-safe-run-once-lazy-loaded-collection/ + private static readonly ConcurrentDictionary> _cache = new ConcurrentDictionary>(); // why lazy? -> http://stackoverflow.com/q/12611167/270315 public static TValue GetOrAdd(TKey key, Func valueFactory) // delegate value factory invocation guaranteed to be atomic { @@ -23,7 +23,9 @@ public static TValue GetOrAdd(TKey key, Func valueFactory) // dele k => new Lazy( () => valueFactory(k), LazyThreadSafetyMode.ExecutionAndPublication)); - return lazyResult.Value; + return lazyResult.Value; /* From http://bit.ly/2b8E1AS: If multiple concurrent threads try to call GetOrAdd with the same key at once, multiple Lazy objects may be + * created but these are cheap, and all but one will be thrown away. The return Lazy object will be the same across all threads, and the + * first one to call the Value property will run the expensive delegate method, whilst the other threads are locked, waiting for the result. */ } public static void Clear() diff --git a/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs b/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs index c5f5b2b..60f0699 100644 --- a/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs +++ b/src/ExpressiveAnnotations.MvcUnobtrusive/Properties/AssemblyInfo.cs @@ -37,5 +37,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.5.0.0")] -[assembly: AssemblyFileVersion("2.5.0.0")] +[assembly: AssemblyVersion("2.5.1.0")] +[assembly: AssemblyFileVersion("2.5.1.0")]