@@ -54,7 +54,7 @@ abstract class ClientSideCacheEntryBase implements ClientSideCacheEntry {
54
54
}
55
55
}
56
56
57
- export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
57
+ class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
58
58
readonly #value: any ;
59
59
60
60
get value ( ) {
@@ -67,7 +67,7 @@ export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
67
67
}
68
68
}
69
69
70
- export class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
70
+ class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
71
71
readonly #sendCommandPromise: Promise < ReplyUnion > ;
72
72
73
73
get promise ( ) {
@@ -95,8 +95,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
95
95
#cacheKeyToEntryMap: Map < string , ClientSideCacheEntry > ;
96
96
#keyToCacheKeySetMap: Map < string , Set < string > > ;
97
97
readonly ttl : number ;
98
- readonly # maxEntries: number ;
99
- readonly # lru: boolean ;
98
+ readonly maxEntries : number ;
99
+ readonly lru : boolean ;
100
100
#cacheHits = 0 ;
101
101
#cacheMisses = 0 ;
102
102
@@ -106,8 +106,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
106
106
this . #cacheKeyToEntryMap = new Map < string , ClientSideCacheEntry > ( ) ;
107
107
this . #keyToCacheKeySetMap = new Map < string , Set < string > > ( ) ;
108
108
this . ttl = config ?. ttl ?? 0 ;
109
- this . # maxEntries = config ?. maxEntries ?? 0 ;
110
- this . # lru = config ?. lru ?? true ;
109
+ this . maxEntries = config ?. maxEntries ?? 0 ;
110
+ this . lru = config ?. lru ?? true ;
111
111
}
112
112
113
113
/* logic of how caching works:
@@ -240,7 +240,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
240
240
return undefined ;
241
241
}
242
242
243
- if ( val !== undefined && this . # lru) {
243
+ if ( val !== undefined && this . lru ) {
244
244
this . #cacheKeyToEntryMap. delete ( cacheKey ) ;
245
245
this . #cacheKeyToEntryMap. set ( cacheKey , val ) ;
246
246
}
@@ -268,7 +268,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
268
268
oldEntry . invalidate ( ) ;
269
269
}
270
270
271
- if ( this . # maxEntries > 0 && count >= this . # maxEntries) {
271
+ if ( this . maxEntries > 0 && count >= this . maxEntries ) {
272
272
this . deleteOldest ( ) ;
273
273
}
274
274
0 commit comments