Skip to content

Commit faa403c

Browse files
sjpotterbobymicroby
authored andcommitted
nits to try and fix github
1 parent 0483e7e commit faa403c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/client/lib/client/cache.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ describe("Client Side Cache", () => {
227227
});
228228
});
229229

230-
describe.only("Pooled Cache", () => {
230+
describe("Pooled Cache", () => {
231231
const csc = new BasicPooledClientSideCache();
232232

233233
testUtils.testWithClient('Virtual Pool Disconnect', async client1 => {

packages/client/lib/client/cache.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ abstract class ClientSideCacheEntryBase implements ClientSideCacheEntry {
5454
}
5555
}
5656

57-
export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
57+
class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
5858
readonly #value: any;
5959

6060
get value() {
@@ -67,7 +67,7 @@ export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
6767
}
6868
}
6969

70-
export class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
70+
class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
7171
readonly #sendCommandPromise: Promise<ReplyUnion>;
7272

7373
get promise() {
@@ -95,8 +95,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
9595
#cacheKeyToEntryMap: Map<string, ClientSideCacheEntry>;
9696
#keyToCacheKeySetMap: Map<string, Set<string>>;
9797
readonly ttl: number;
98-
readonly #maxEntries: number;
99-
readonly #lru: boolean;
98+
readonly maxEntries: number;
99+
readonly lru: boolean;
100100
#cacheHits = 0;
101101
#cacheMisses = 0;
102102

@@ -106,8 +106,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
106106
this.#cacheKeyToEntryMap = new Map<string, ClientSideCacheEntry>();
107107
this.#keyToCacheKeySetMap = new Map<string, Set<string>>();
108108
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;
111111
}
112112

113113
/* logic of how caching works:
@@ -240,7 +240,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
240240
return undefined;
241241
}
242242

243-
if (val !== undefined && this.#lru) {
243+
if (val !== undefined && this.lru) {
244244
this.#cacheKeyToEntryMap.delete(cacheKey);
245245
this.#cacheKeyToEntryMap.set(cacheKey, val);
246246
}
@@ -268,7 +268,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
268268
oldEntry.invalidate();
269269
}
270270

271-
if (this.#maxEntries > 0 && count >= this.#maxEntries) {
271+
if (this.maxEntries > 0 && count >= this.maxEntries) {
272272
this.deleteOldest();
273273
}
274274

packages/client/lib/cluster/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,12 @@ export default class RedisCluster<
599599
}
600600

601601
close() {
602-
this.#slots.clientSideCache?.onPoolClose();
602+
this._self.#slots.clientSideCache?.onPoolClose();
603603
return this._self.#slots.close();
604604
}
605605

606606
destroy() {
607-
this.#slots.clientSideCache?.onPoolClose();
607+
this._self.#slots.clientSideCache?.onPoolClose();
608608
return this._self.#slots.destroy();
609609
}
610610

packages/client/lib/sentinel/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ class RedisSentinelInternal<
612612
this.#scanInterval = options.scanInterval ?? 0;
613613
this.#passthroughClientErrorEvents = options.passthroughClientErrorEvents ?? false;
614614

615-
this.#nodeClientOptions = options.nodeClientOptions ? {...options.nodeClientOptions} : {};
615+
this.#nodeClientOptions = (options.nodeClientOptions ? {...options.nodeClientOptions} : {}) as RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>;
616616
if (this.#nodeClientOptions.url !== undefined) {
617617
throw new Error("invalid nodeClientOptions for Sentinel");
618618
}

0 commit comments

Comments
 (0)