예제 #1
0
        public DateTimeOffset GetLastModifiedDate(string entityName)
        {
            entityName ??= string.Empty;

            var cacheKey = CacheKey.With(GetType(), nameof(GetLastModifiedDate), entityName);

            return(_memoryCache.GetOrCreateExclusive(cacheKey, options =>
            {
                options.AddExpirationToken(LastChangesCacheRegion.CreateChangeTokenForKey(entityName));

                return DateTimeOffset.UtcNow;
            }));
        }