@@ -194,7 +194,7 @@ NOTE: The significant difference between this and the above more robus caching f
194194provide for any reclaming of resources by garbage collection, etc. unless manually implemented via ` WeakReference ` yourself.
195195
196196NOTE: It supports basic removal, but the ` LazyStaticInMemoryCache<> ` provides a pattern (of Lazy + ConcurrentDictionary) that is
197- best used for data that never chagnes once it is loaded/initialized (e.g. Reflection Results, Annotation Attribute cache, etc.).
197+ best used for data that never changes once it is loaded/initialized (e.g. Reflection Results, Annotation Attribute cache, etc.).
198198In almost all cases for data that changes over it's life, the LazyCache<> above with support for cache expiration policy is the
199199better pattern to use along with it's intrinsic support of garbage collection pressure to reclaim resources.
200200
@@ -207,7 +207,7 @@ public class AttributeConfigReader
207207 [AttributeUsage (AttributeTargets .Class )]
208208 private class ConfigAttribute : Attribute
209209 {
210- . . . implement your design time configuration properties . . .
210+ // . . . implement your design time configuration properties . . .
211211 }
212212
213213 // By making the cache static it is now a global and thread-safe blocking cache; enabling only
@@ -229,11 +229,11 @@ public class AttributeConfigReader
229229 // how many or how fast multiple (e.g. hundreds/thousands) threads/reqeuests come in for that same data!
230230 // NOTE: Exception handling is critical here -- because Lazy<> will cache the Exception -- and
231231 // this class ensures that exceptions are never cached!
232- var cacheResult = _lazyAttribConfigCache .GetOrAdd (typeof (T ), (key ) =>
232+ var cacheResult = _lazyAttribConfigCache .GetOrAdd (typeof (T ), (typeKey ) =>
233233 {
234234 // NOTE: If an Exception occurs then the result will not be cached, only value values
235235 // will be cached (e.g. a safe response of null will be cached).
236- var configAttribute = GetConfigAttributeInternal ();
236+ var configAttribute = GetConfigAttributeInternal (typeKey );
237237 return configAttribute ;
238238 });
239239
0 commit comments