title: DistributedCache Expiry time based on server location
body: <p>I have an ASP.NET Core 3.0 Application.  In my Startup.cs in configure service I have added the following line:</p>
  
  <pre><code>services.AddDistributedMemoryCache();
  </code></pre>
  
  <p>I am using a Distributed Memory Cache for some lightweight caching.  However I do have a question on the Cache Expiry - this is the code I have for setting "Foo" in this case in the cache for 5 mins:</p>
  
  <pre><code>_cache.SetString(cacheKey, "Foo", new DistributedCacheEntryOptions() { AbsoluteExpiration = DateTimeOffset.UtcNow.AddMinutes(5) });
  </code></pre>
  
  <p>My question is on the AbsoluteExpiration I am using:</p>
  
  <p>If I have 2 servers in London for example will the Data be held in cache for 5 mins</p>
  
  <p>If I have two servers in Chicago will the data be held in cache for 5 hours 5 mins</p>
  
  <p>If I have a server in London and Chicago will it be 5 mins in one and 5 hours and 5 in the other</p>
  
  <p>*Note - I am assuming the first two requests hit both servers in web farm for simplicity and thus set the cache data in both servers</p>
  
  <p>Should I just be using <code>DateTimeOffset.Now</code> rather than <code>DateTimeOffset.UtcNow</code></p>