Hi,
I've created a fork for 2nd level caching in the entity framework,
http://nopcommerce.codeplex.com/SourceControl/network/forks/morley/2ndLevelCaching
New Project Files
* I've included the source files for the EFCachingProvider libraries. These could almost certainly be made into dependencies, but I thought I'd include them so you can see what's going on.
Changes required to inject the provider
* It was actually simplier than I thought to inject the provider into the pipeline. I create a new class NopCachedContextConnectionFactory to return a wrapped DbConnection and just had BaseEfDataProvider create this class by default - the factory will create the appropriate provider.
Issues
* This works fine for SQL Server, but I had a few issues with SQL server CE when creating dummy data. I think this is due to my environment though.
Seems to be working OK and there are definitely some speed improvements :)
If we think this could be a viable option to introduce query caching into Nop, then maybe we'd want to do something a bit more intelligent with the ICache object, such as limiting max number of objects or various other settings.
Cheers