Skip to content

Commit c9e5fae

Browse files
committed
feat(image-loader-config): add setMaximumCacheSize and setMaximumCacheAge
1 parent 6a29597 commit c9e5fae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/providers/image-loader-config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,20 @@ export class ImageLoaderConfig {
126126
this.concurrency = concurrency;
127127
}
128128

129+
/**
130+
* Sets the maximum allowed cache size
131+
* @param cacheSize {number} Cache size in bytes
132+
*/
133+
setMaximumCacheSize(cacheSize: number): void {
134+
this.maxCacheSize = cacheSize;
135+
}
136+
137+
/**
138+
* Sets the maximum allowed cache age
139+
* @param cacheAge {number} Maximum cache age in milliseconds
140+
*/
141+
setMaximumCacheAge(cacheAge: number): void {
142+
this.maxCacheAge = cacheAge;
143+
}
144+
129145
}

0 commit comments

Comments
 (0)