mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 21:05:11 +00:00
commit
37b3c054fe
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ That is, when someone requests the text of a file for the first time:
|
|||
3. Invalidate the cached file once the watcher sends a change notification.
|
||||
|
||||
This is possible to achieve in salsa, using a derived query and `report_synthetic_read` and `invalidate` queries.
|
||||
The setup looks roughtly like this:
|
||||
The setup looks roughly like this:
|
||||
|
||||
```rust,ignore
|
||||
#[salsa::query_group(VfsDatabaseStorage)]
|
||||
|
|
|
@ -62,8 +62,8 @@ This will result in a dependency graph like so:
|
|||
request_text --> parse --> header --> content_type --> (other queries)
|
||||
```
|
||||
|
||||
The advantage of this is that changes that only effect the "body" of
|
||||
only consume small parts of itthe request will
|
||||
The advantage of this is that changes that only effect the "body" or
|
||||
only consume small parts of the request will
|
||||
not require us to re-execute `content_type` at all. This would be particularly
|
||||
valuable if there are a lot of dependent headers.
|
||||
|
||||
|
|
Loading…
Reference in a new issue