title: Does UserManager<IdentityUser> have cache?
body: <p>I have an application that uses Microsoft.AspNetCore.Identity.UserManager to manage users. I use core 2.2. <strong>UserManager is injected by built-in dependency injection in my services (not by me)</strong>. like this:  </p>
  
  <pre><code>public MyService(UserManager&lt;IdentityUser&gt; userManager)
  {
     _userManager = userManager;
  }
  </code></pre>
  
  <p>When I try to get a user by Id (FindByIdAsync) for the first time I see a request to db in a console. Next requests with the same Id I do not see any request to db, but the application works and got user.</p>
  
  <p>In Startup.cs I do not have a configuration for userManager. I just use the extension method:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
          {
              services
                  .AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
                  options.UseSqlServer(
                  Configuration.GetConnectionString("MyConnectionString"));
              services
                  .AddIdentity&lt;IdentityUser, IdentityRole&gt;()
                  .AddEntityFrameworkStores&lt;ApplicationDbContext&gt;()
              services.AddMvc();
              var configService = new ConfigurationService(Configuration);
              services
                  .AddIdentityServer()
                  .AddDeveloperSigningCredential()
                  .AddInMemoryApiResources(configService.GetApiResources())
                  .AddInMemoryClients(configService.GetClients())
                  .AddTestUsers(configService.GetUsers());
          }
  </code></pre>
  
  <p><strong>Question</strong>: Maybe there is a way how to configure this caching feature in UserManager? Point me out where to get information about how long this cache leaves.</p>