Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Authoring/Configs/CacheStoreValueConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public record CacheStoreValueConfig
/// Policy expressions are allowed.
/// </summary>
[ExpressionAllowed]
public required uint Duration { get; init; }
public required int Duration { get; init; }

/// <summary>
/// Optional. One of the following values: prefer-external, external, internal.<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/Authoring/IFragmentContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public interface IFragmentContext : IHaveExpressionContext
/// <param name="cacheResponse">
/// Indicates whether the response should be cached. If set to false, the response will not be cached. Policy expressions are allowed.
/// </param>
void CacheStore([ExpressionAllowed] uint duration, [ExpressionAllowed] bool? cacheResponse);
void CacheStore([ExpressionAllowed] int duration, [ExpressionAllowed] bool? cacheResponse);

/// <summary>
/// Stores a value in the cache using a specified key.<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/Authoring/IOutboundContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public interface IOutboundContext : IHaveExpressionContext
/// <param name="cacheResponse">
/// Indicates whether the response should be cached. If set to false, the response will not be cached. Policy expressions are allowed.
/// </param>
void CacheStore([ExpressionAllowed] uint duration, [ExpressionAllowed] bool? cacheResponse);
void CacheStore([ExpressionAllowed] int duration, [ExpressionAllowed] bool? cacheResponse);

/// <summary>
/// Stores a value in the cache using a specified key.<br/>
Expand Down
4 changes: 2 additions & 2 deletions src/Testing/Emulator/Data/CacheStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Testing/Emulator/Data/CacheValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

namespace Microsoft.Azure.ApiManagement.PolicyToolkit.Testing.Emulator.Data;

public record CacheValue(object Value, uint Duration = 0);
public record CacheValue(object Value, int Duration = 0);
Loading