Fix flakiness caused by expired cache entries
parent
de3861757c
commit
d344400688
|
@ -96,8 +96,10 @@ export function getLanguageBoundaries(
|
|||
text: string = doc.getText()
|
||||
): LanguageBoundary[] | null {
|
||||
let cacheKey = `${doc.languageId}:${text}`
|
||||
if (cache.has(cacheKey)) {
|
||||
return cache.get(cacheKey)
|
||||
|
||||
let cachedBoundaries = cache.get(cacheKey)
|
||||
if (cachedBoundaries !== undefined) {
|
||||
return cachedBoundaries
|
||||
}
|
||||
|
||||
let defaultType = isVueDoc(doc)
|
||||
|
|
Loading…
Reference in New Issue