# Cache dynamic JSON schemas with invalidation \(\#46824\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6e0dc03c1e83ca1ee79ee63e0bf1fcfb1e0a165a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6e0dc03c1e83ca1ee79ee63e0bf1fcfb1e0a165a

Requested commit: 6e0dc03c1e83ca1ee79ee63e0bf1fcfb1e0a165a

Commit: 6e0dc03c1e83ca1ee79ee63e0bf1fcfb1e0a165a

Tree: fe5549dcd13db2616f59a1b2e36aba52ca08838b

Author: Richard Feldman

Committer: GitHub

## Message

```
Cache dynamic JSON schemas with invalidation (#46824)

Dynamic schemas (settings, settings/lsp/*, debug_tasks) are now cached
after first generation and returned immediately via Task::ready() on
subsequent requests.

Cache is invalidated when `notify_schema_changed()` is called, which
happens when:
- Extensions are installed/uninstalled (affects settings schema)
- DAP registry changes (affects debug_tasks schema)

This eliminates repeated foreground thread blocking for the same dynamic
schema.

**Note:** This PR is based on #46823 and should be merged after it.

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

- [3d0222a5afcd497a9c470692aa53c5d61195aed4](https://git.cafe/gitcafe/zed/commit/3d0222a5afcd497a9c470692aa53c5d61195aed4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6e0dc03c1e83ca1ee79ee63e0bf1fcfb1e0a165a?format=markdown)
