salsa/components
bors[bot] eca8bad6e9
Merge #352
352: Add options to tracked funcitons for lru capacity  r=nikomatsakis a=XFFXFF

fixes #344 

Now we can write something like the following to set the lru capacity of tracked functions  
```rust
#[salsa::tracked(lru=32)]
fn my_tracked_fn(db: &dyn crate::Db, ...) { }
```

some details:  
* lru should not be combined with specify. We will report an error if people do #[salsa::tracked(lru = 32, specify)]
* set 0 as default capacity to disable LRU (Because I think doing this would make the code simpler when implementing `create_ingredients` of tracked functions).
* old salsa support to change lru capacity at runtime, [as noted here](https://salsa-rs.github.io/salsa/rfcs/RFC0004-LRU.html?highlight=change#reference-guide), but we do not support this now

Co-authored-by: XFFXFF <1247714429@qq.com>
2022-08-18 10:37:38 +00:00
..
salsa-2022 refactor and cargo fmt 2022-08-18 08:07:13 +08:00
salsa-2022-macros Merge #352 2022-08-18 10:37:38 +00:00
salsa-macros Expose the ability to remove the value from an input query, taking ownership of it 2022-06-03 05:52:00 -04:00