Changed:
- Upgraded lru dependency to fix a security vulnerability. PR
New/Changed:
- TTL Backing now uses fewer iterations through the entire list
- Backings can define a
Meta
type which can be used for improved handling with the loader - TTL Backing now supports a
TtlMeta
-> Custom duration per entry - TTL Backing now supports other nested
CacheBacking
s (i.e. TTL+LRU) - New methods:
LoadingCache::with_meta_loader()
,LoadingCache#set_with_meta
Breaking:
- Backings trait changed:
- All methods now return a result
- contains_key takes a mutable self reference
- remove_if returns the removed k/v pairs
- Meta Type added / set signature now has a meta field
New/Changed:
- Replace SystemTime calls with Instant
- Implement additional helper method: clear
- Change new/with_backing signature to return no CacheHandle
Breaking:
- Instantiation method signature changed
- Backing interface extended with "clear method"
- Add additional helper methods
- update_if_exists
- update_mut_if_exists
- remove_if
- Change Backing Trait to support
remove_if
. This might be breaking if you have a custom backing.
- Add ttl-cache feature
- [Breaking] Return type of the loader function changed from Optional to Result<T, E>
- [Breaking] CacheLoadingError now contains the LoadingError(E) and various other error types instead of a simple struct
- Additional method to receive additional data about the source of the data - Either cache or loader function
- Add update_mut function to update a mutable entry
- Update tokio-rs
- Implement update function
- All api methods should have some documentation now
- Start writing changelogs :^)