pub struct Cache {
pub project_request_full_config: bool,
pub project_expiry: u32,
pub project_grace_period: u32,
pub project_refresh_interval: Option<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: boolThe full project state will be requested by this Relay if set to true.
project_expiry: u32The cache timeout for project configurations in seconds.
project_grace_period: u32Continue 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.
project_refresh_interval: Option<u32>Refresh a project after the specified seconds.
The time must be between expiry time and the grace period.
By default there are no refreshes enabled.
relay_expiry: u32The cache timeout for downstream relay info (public keys) in seconds.
miss_expiry: u32The cache timeout for non-existing entries.
batch_interval: u32The buffer timeout for batched project config queries before sending them upstream in ms.
downstream_relays_batch_interval: u32The buffer timeout for batched queries of downstream relays in ms. Defaults to 100ms.
batch_size: usizeThe 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: u32Interval for watching local cache override files in seconds.
global_config_fetch_interval: u32Interval 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 UnsafeUnpin 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