pub struct Cache {
pub project_request_full_config: bool,
pub project_expiry: u32,
pub project_grace_period: u32,
pub relay_expiry: u32,
pub miss_expiry: u32,
pub batch_interval: u32,
pub downstream_relays_batch_interval: u32,
pub batch_size: usize,
pub file_interval: u32,
pub global_config_fetch_interval: u32,
/* private fields */
}
Expand description
Controls internal caching behavior.
Fields§
§project_request_full_config: bool
The full project state will be requested by this Relay if set to true
.
project_expiry: u32
The cache timeout for project configurations in seconds.
project_grace_period: u32
Continue using project state this many seconds after cache expiry while a new state is
being fetched. This is added on top of project_expiry
.
Default is 2 minutes.
relay_expiry: u32
The cache timeout for downstream relay info (public keys) in seconds.
miss_expiry: u32
The cache timeout for non-existing entries.
batch_interval: u32
The buffer timeout for batched project config queries before sending them upstream in ms.
downstream_relays_batch_interval: u32
The buffer timeout for batched queries of downstream relays in ms. Defaults to 100ms.
batch_size: usize
The maximum number of project configs to fetch from Sentry at once. Defaults to 500.
cache.batch_interval
controls how quickly batches are sent, this controls the batch size.
file_interval: u32
Interval for watching local cache override files in seconds.
global_config_fetch_interval: u32
Interval for fetching new global configs from the upstream, in seconds.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Cache
impl<'de> Deserialize<'de> for Cache
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more