> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CredentialsCacheConfig

<span id="atoti.CredentialsCacheConfig" />

> atoti.CredentialsCacheConfig(<br />
>     \*,<br />
>     *max\_count*: [int](https://docs.python.org/3/builtins/functions.html#int) = `10000`,<br />
> )

The config of the cache of accepted credentials.

Checking a password can be slow (the password encoder is memory-hard, e.g. Argon2),
so the session remembers the credentials it already accepted instead of checking them again
on every request.
Only successful checks are cached: a rejected password always runs the full check.

### Attributes

<h4 id="atoti.CredentialsCacheConfig.max_count">
  *max\_count*
</h4>

How many accepted credentials pairs are remembered at once.

Once reached, remembering another pair drops the least recently used one.

`0` disables the cache.
