chore: add configurable cache control (#498)

* chore: add configurable cache control

* fix: ci/cd
This commit is contained in:
Fan
2025-09-01 22:02:46 +08:00
committed by GitHub
parent 2572faf726
commit f024bba2ef
5 changed files with 57 additions and 1 deletions

View File

@@ -217,6 +217,7 @@ export interface ConfigParameters {
contentGenerator?: {
timeout?: number;
maxRetries?: number;
disableCacheControl?: boolean;
samplingParams?: {
[key: string]: unknown;
};
@@ -302,6 +303,7 @@ export class Config {
private readonly contentGenerator?: {
timeout?: number;
maxRetries?: number;
disableCacheControl?: boolean;
samplingParams?: Record<string, unknown>;
};
private readonly cliVersion?: string;
@@ -801,6 +803,10 @@ export class Config {
return this.contentGenerator?.maxRetries;
}
getContentGeneratorDisableCacheControl(): boolean | undefined {
return this.contentGenerator?.disableCacheControl;
}
getContentGeneratorSamplingParams(): ContentGeneratorConfig['samplingParams'] {
return this.contentGenerator?.samplingParams as
| ContentGeneratorConfig['samplingParams']