Skip to content

Commit 419e27c

Browse files
feat(apim): Add APIM caching with query string (#873)
* feat(apim): Add APIM caching with query string * feat(apim): Add APIM caching with query string
1 parent 63f5368 commit 419e27c

File tree

1 file changed

+5
-2
lines changed
  • src/lib/azure/services/api-management

1 file changed

+5
-2
lines changed

src/lib/azure/services/api-management/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,12 @@ export class AzureApiManagementManager {
381381
382382
// Full path construction (without query parameters)
383383
string fullPath = context.Request.Url.Path.ToLower();
384-
384+
385+
// Query arameters
386+
string query = context.Request.Url.Query.ToLower();
387+
385388
// Construct final cache key (no Accept header needed for JSON-only APIs)
386-
return $"{apiName}:{apiVersion}:{fullPath}";
389+
return $"{apiName}:{apiVersion}:{fullPath}:{query}";
387390
}" />
388391
<set-variable name="clearCache" value="@(context.Request.Headers.GetValueOrDefault("X-Apim-Clear-Cache", "false").ToLower())" />
389392

0 commit comments

Comments
 (0)