junaiddshaukat commented on code in PR #37214:
URL: https://github.com/apache/beam/pull/37214#discussion_r2662513912


##########
sdks/typescript/src/apache_beam/worker/state.ts:
##########
@@ -49,9 +49,37 @@ export interface StateProvider {
 export class CachingStateProvider implements StateProvider {
   underlying: StateProvider;
   cache: Map<string, MaybePromise<any>> = new Map();
+  maxCacheSize: number;
 
-  constructor(underlying: StateProvider) {
+  constructor(underlying: StateProvider, maxCacheSize: number = 1000) {

Review Comment:
   I have changed from count-based eviction (number of keys) to size-based 
eviction (memory consumed), similar to the Python implementation at 
statecache.py



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to