Wiki

Clone wiki

Wxen.NET DbHug / Caching

##DbHug ##Caching


Caching mechanism is made to carry mappings after its build, to aviod rebuilding mappings for each DbHug instance. It is usefull in web applications where instances creation is often event, so to not rebuild mappings each time, they may be taken from cache.
By default caching is turned on and default mappings config is MappingsConfig<Mappings>(true). Mappings are cached for each Mappings derived type. That means that MappingsConfig<Mappings> and MappingsConfig<CustomMappings> has different cache.


##Turning Off

#!csharp

var dbHug = new DbHug(new ConnectionHug(...), new MappingsConfig<Mappings>(false));

Async ...Database Settings

Updated