SamSaffron/dapper-dot-net — pull request #80 by qasidsadiq (2013-04-10 01:05:01+00:00)
Title: Multenant DB queries are cached only once for whole set, as compared to once per whole set.

Multitenant DB's (DB's that share the same schema) can share the same queries. But these queries are cached for each DB (even though only one query needs to be cached).
This change allows users to pass in functions which determine if a connectionString represents a DB that is part of a set of Multi-tenant DBs using "Identity.AddIsMultitenantDBForConnectionStringFuncs". A connectionString in Identity that is identified as a Multitenant DB from one of the functions is considered Equal to every other connection string that matches the same function. This way queries in multi-tenant DB's are cached only once.
For example, if all 10000 DB's all share the same schema, instead of caching queries separately for each of them, Dapper can cache one set of queries that can be applied to all of them.