 
     public func invalidateCache() {
         responseCache.invalidate(self)
-        assertHandlers.removeValue(forKey: cacheKey)
+        assertHandlerCache.invalidate(self)
         structureCache.invalidate(self)
         syntaxMapCache.invalidate(self)
         syntaxTokensByLinesCache.invalidate(self)


    internal var assertHandler: AssertHandler? {
        get {
            return assertHandlers[cacheKey]
        }
        set {
            assertHandlers[cacheKey] = newValue
        }
    }


internal typealias AssertHandler = () -> Void

private var assertHandlers = [String: AssertHandler]()
private var assertHandlerCache = Cache({ file in assertHandlers[file.cacheKey] })

private struct RebuildQueue {
    private let lock = NSLock()
