Last active
February 26, 2016 12:49
-
-
Save asmorger/9911426f30d635b148dc to your computer and use it in GitHub Desktop.
Cash Dependency Injection Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public stitac class DependencyInjectionConfiguration | |
| { | |
| public static void Register(ContainerBuilder builder, | |
| ICacheKeyRegistrationService cacheKeyRegistrationService) | |
| { | |
| Cash.RegisterCacheInfrastructure(builder, | |
| MemoryCache.Default, | |
| cacheKeyRegistrationService); | |
| builder.RegisterType<UserService>() | |
| .As<IUserService>() | |
| .InstancePerHttpRequest() | |
| .WithDefaultCache(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment