Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): extend negative repository identity cache ttl #2083

Mergedm-mohamed(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/2083/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 6 additions and 4 deletions.

x
0 of 2 viewed, 2 left
5 additions and 3 deletionsapps/server/src/project/Layers/RepositoryIdentityResolver.test.tsModified
View file
@@ -112,7 +112,7 @@
​
it.effect(
- "refreshes cached null identities after the negative TTL when a remote is configured later",
+ "keeps null identities cached across repeated resolves until the negative TTL expires",
() =>
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
@@ -128,8 +128,10 @@
​
yield* git(cwd, ["remote", "add", "origin", "git@github.com:T3Tools/t3code.git"]);
​
- const cachedIdentity = yield* resolver.resolve(cwd);
- expect(cachedIdentity).toBeNull();
+ for (const _attempt of [1, 2, 3]) {
+ const cachedIdentity = yield* resolver.resolve(cwd);
+ expect(cachedIdentity).toBeNull();
+ }
​
yield* TestClock.adjust(Duration.millis(120));
​
1 addition and 1 deletionapps/server/src/project/Layers/RepositoryIdentityResolver.tsModified
View file
@@ -66,7 +66,7 @@
​
const DEFAULT_REPOSITORY_IDENTITY_CACHE_CAPACITY = 512;