Skip to content

Commit

Permalink
nits to try and fix github
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpotter committed Nov 5, 2024
1 parent 5a2b91c commit 0462621
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions packages/client/lib/client/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class ClientSideCacheEntryBase implements ClientSideCacheEntry {
}
}

export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
readonly #value: any;

get value() {
Expand All @@ -67,7 +67,7 @@ export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
}
}

export class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
readonly #sendCommandPromise: Promise<ReplyUnion>;

get promise() {
Expand Down Expand Up @@ -95,8 +95,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
#cacheKeyToEntryMap: Map<string, ClientSideCacheEntry>;
#keyToCacheKeySetMap: Map<string, Set<string>>;
readonly ttl: number;
readonly #maxEntries: number;
readonly #lru: boolean;
readonly maxEntries: number;
readonly lru: boolean;
#cacheHits = 0;
#cacheMisses = 0;

Expand All @@ -106,8 +106,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
this.#cacheKeyToEntryMap = new Map<string, ClientSideCacheEntry>();
this.#keyToCacheKeySetMap = new Map<string, Set<string>>();
this.ttl = config?.ttl ?? 0;
this.#maxEntries = config?.maxEntries ?? 0;
this.#lru = config?.lru ?? true;
this.maxEntries = config?.maxEntries ?? 0;
this.lru = config?.lru ?? true;
}

/* logic of how caching works:
Expand Down Expand Up @@ -240,7 +240,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
return undefined;
}

if (val !== undefined && this.#lru) {
if (val !== undefined && this.lru) {
this.#cacheKeyToEntryMap.delete(cacheKey);
this.#cacheKeyToEntryMap.set(cacheKey, val);
}
Expand Down Expand Up @@ -268,7 +268,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
oldEntry.invalidate();
}

if (this.#maxEntries > 0 && count >= this.#maxEntries) {
if (this.maxEntries > 0 && count >= this.maxEntries) {
this.deleteOldest();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/client/lib/sentinel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class RedisSentinelInternal<
this.#scanInterval = options.scanInterval ?? 0;
this.#passthroughClientErrorEvents = options.passthroughClientErrorEvents ?? false;

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

0 comments on commit 0462621

Please sign in to comment.