pub struct ARCache<K, V> where
    K: Hash + Eq + Ord + Clone + Debug + Sync + Send + 'static,
    V: Clone + Debug + Sync + Send + 'static, 
{ /* private fields */ }
Expand description

A concurrently readable adaptive replacement cache. Operations are performed on the cache via read and write operations.

Implementations

👎 Deprecated since 0.2.20:

please useARCacheBuilder instead

Use ARCacheBuilder instead

👎 Deprecated since 0.2.20:

please useARCacheBuilder instead

Use ARCacheBuilder instead

👎 Deprecated since 0.2.20:

please useARCacheBuilder instead

Use ARCacheBuilder instead

Begin a read operation on the cache. This reader has a thread-local cache for items that are localled included via insert, and can communicate back to the main cache to safely include items.

Begin a write operation on the cache. This writer has a thread-local store for all items that have been included or dirtied in the transactions, items may be removed from this cache (ie deleted, invalidated).

View the statistics for this cache. These values are a snapshot of a point in time and may not be accurate at “this exact moment”. You may pin this value for as long as you wish without causing excess memory usage or transaction cleanup issues.

Reset access stats for this cache. This will reset all the hit and include fields, but values related to current cache state are not altered. This can be useful after a bulk import to prevent polution of the stats from that operation.

If the lock is available, attempt to quiesce the cache’s async channel states. If the lock is currently held, no action is taken.

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.