pub enum CachePolicy {
Shared,
Bypass,
}Expand description
Whether a given conversion consults the shared graphics cache.
The cache root is process-global, host-persistent state: it comes
from LATEXML_GRAPHICS_CACHE_DIR, else
$XDG_CACHE_HOME/latexml-oxide/graphics, which survives across runs
and across unrelated conversions. A caller that needs its conversions
to actually run — rather than be served from whatever a previous
run on this host happened to leave behind — must be able to opt out,
and must be able to do so without mutating the environment
(set_var is process-wide and racy against every other thread).
Hence an explicit, caller-threaded policy rather than another env var.
The env kill-switch LATEXML_GRAPHICS_CACHE_OFF=1 still applies
independently, inside lookup / store.
Variants§
Consult and populate the shared cache. The production default.
Bypass
Bypass the cache entirely: every conversion runs, nothing is read and nothing is stored. Used where the conversion itself is the observable under test, so a prior run’s cached output must not be able to substitute for it.
Trait Implementations§
Source§impl Clone for CachePolicy
impl Clone for CachePolicy
Source§fn clone(&self) -> CachePolicy
fn clone(&self) -> CachePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CachePolicy
Source§impl Debug for CachePolicy
impl Debug for CachePolicy
Source§impl Default for CachePolicy
impl Default for CachePolicy
Source§fn default() -> CachePolicy
fn default() -> CachePolicy
impl Eq for CachePolicy
Source§impl PartialEq for CachePolicy
impl PartialEq for CachePolicy
impl StructuralPartialEq for CachePolicy
Auto Trait Implementations§
impl Freeze for CachePolicy
impl RefUnwindSafe for CachePolicy
impl Send for CachePolicy
impl Sync for CachePolicy
impl Unpin for CachePolicy
impl UnsafeUnpin for CachePolicy
impl UnwindSafe for CachePolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.