pub enum Strategy {
ReadWrite,
ReadOnly,
}Expand description
How a region is kept in step with the database.
Variants§
ReadWrite
Entities and queries are dropped when the table is written to.
The default, and the only one that is safe without knowing the application: a write bumps the table’s generation and every cached query for it becomes a miss.
ReadOnly
The table is never written to, so nothing is ever invalidated.
For reference data — countries, currencies, a list of statuses. It
skips the generation read entirely, which is one round trip less per
query, and it is a promise the caller makes: a write to a read-only
region is served stale until the entry expires. Region::ttl is what
bounds that, so a read-only region with no TTL is refused.
Trait Implementations§
impl Copy for Strategy
impl Eq for Strategy
impl StructuralPartialEq for Strategy
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more