In a previous post I talked about the how the use of an ORM would have saved development time. Having made the statement I thought I would share how the UI service layer we introduced still received a considerable benefit from the introduction of an in-memory cache. The constructor for the service is shown below, as you can see pretty standard really, the interesting interface is the ICacheProvider. As I said in the previous post this service interface and implementation would not exist if an ORM had been used. The ICacheProvider interface is literally an abstraction around the MemoryCache provided by .Net framework, this then allowed a null caching provider to be defined as well as testing isolation. public interface ICacheProvider { bool Add ( CacheItem item , CacheItemPolicy policy ) ; object AddOrGetExisting ( string key , object value , CacheItemPolicy policy , string regionName ) ; bool Add ( string key , object valu...