Commit 5a5ad69
committed
css: fix language model cache evicting at capacity instead of overflow
The `getLanguageModelCache` eviction check used `===` to compare the
current entry count against `maxEntries`, which triggered eviction as
soon as the cache reached its maximum size. As a result the cache only
held `maxEntries - 1` entries at steady state instead of the intended
`maxEntries`.
Changing the condition to `>` ensures eviction only occurs when the
count exceeds `maxEntries`, allowing the cache to retain the full
number of intended entries.1 parent f4e6a58 commit 5a5ad69
File tree
1 file changed
+1
-1
lines changed- extensions/css-language-features/server/src
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments