diff --git a/src/Authoring/Configs/CacheStoreValueConfig.cs b/src/Authoring/Configs/CacheStoreValueConfig.cs index 8d4e667..69c199e 100644 --- a/src/Authoring/Configs/CacheStoreValueConfig.cs +++ b/src/Authoring/Configs/CacheStoreValueConfig.cs @@ -29,7 +29,7 @@ public record CacheStoreValueConfig /// Policy expressions are allowed. /// [ExpressionAllowed] - public required uint Duration { get; init; } + public required int Duration { get; init; } /// /// Optional. One of the following values: prefer-external, external, internal.
diff --git a/src/Authoring/IFragmentContext.cs b/src/Authoring/IFragmentContext.cs index 62de64c..3358b46 100644 --- a/src/Authoring/IFragmentContext.cs +++ b/src/Authoring/IFragmentContext.cs @@ -148,7 +148,7 @@ public interface IFragmentContext : IHaveExpressionContext /// /// Indicates whether the response should be cached. If set to false, the response will not be cached. Policy expressions are allowed. /// - void CacheStore([ExpressionAllowed] uint duration, [ExpressionAllowed] bool? cacheResponse); + void CacheStore([ExpressionAllowed] int duration, [ExpressionAllowed] bool? cacheResponse); /// /// Stores a value in the cache using a specified key.
diff --git a/src/Authoring/IOutboundContext.cs b/src/Authoring/IOutboundContext.cs index 3daf9e2..92948f0 100644 --- a/src/Authoring/IOutboundContext.cs +++ b/src/Authoring/IOutboundContext.cs @@ -82,7 +82,7 @@ public interface IOutboundContext : IHaveExpressionContext /// /// Indicates whether the response should be cached. If set to false, the response will not be cached. Policy expressions are allowed. /// - void CacheStore([ExpressionAllowed] uint duration, [ExpressionAllowed] bool? cacheResponse); + void CacheStore([ExpressionAllowed] int duration, [ExpressionAllowed] bool? cacheResponse); /// /// Stores a value in the cache using a specified key.
diff --git a/src/Testing/Emulator/Data/CacheStore.cs b/src/Testing/Emulator/Data/CacheStore.cs index 43e2b8d..1fc5db8 100644 --- a/src/Testing/Emulator/Data/CacheStore.cs +++ b/src/Testing/Emulator/Data/CacheStore.cs @@ -28,13 +28,13 @@ public CacheStore WithExternalCacheSetup(bool isSetup = true) return this; } - public CacheStore WithExternalCacheValue(string key, object value, uint duration = 10) + public CacheStore WithExternalCacheValue(string key, object value, int duration = 10) { _externalCache.Add(key, new CacheValue(value, duration)); return this; } - public CacheStore WithInternalCacheValue(string key, object value, uint duration = 10) + public CacheStore WithInternalCacheValue(string key, object value, int duration = 10) { _internalCache.Add(key, new CacheValue(value, duration)); return this; diff --git a/src/Testing/Emulator/Data/CacheValue.cs b/src/Testing/Emulator/Data/CacheValue.cs index 072dc66..5382255 100644 --- a/src/Testing/Emulator/Data/CacheValue.cs +++ b/src/Testing/Emulator/Data/CacheValue.cs @@ -3,4 +3,4 @@ namespace Microsoft.Azure.ApiManagement.PolicyToolkit.Testing.Emulator.Data; -public record CacheValue(object Value, uint Duration = 0); \ No newline at end of file +public record CacheValue(object Value, int Duration = 0); \ No newline at end of file