davidfowl / DotNetCodingPatterns

A collection of coding patterns in no particular order
1.38k stars 99 forks source link

Make Cache<T>.Instance static #3

Closed poke closed 3 years ago

poke commented 3 years ago

The Instance property of Cache<T> should be static in order to access the property by its type.

redcoreit commented 3 years ago

where T: new() also required for Create<> method as well as for Cache<> class.