#ifndef AUTH_CACHE_H
#define AUTH_CACHE_H
struct auth_cache_node {
/* Total number of bytes used by this node */
/* TRUE if the user gave the correct password the last time. */
};
struct auth_cache;
struct auth_request;
/* Parses all %x variables from query and compresses them into tab-separated
list, so it can be used as a cache key. */
/* Create a new cache. max_size specifies the maximum amount of memory in
bytes to use for cache (it's not fully exact). ttl_secs specifies time to
live for cache record, requests older than that are not used.
neg_ttl_secs specifies the TTL for negative entries. */
unsigned int neg_ttl_secs);
/* Clear the cache. Returns how many entries were removed. */
unsigned int ATTR_NOWARN_UNUSED_RESULT
const char *const *usernames);
/* Look key from cache. key should be the same string as returned by
auth_cache_parse_key(). Returned node can't be used after any other
auth_cache_*() calls. */
const char *
bool *expired_r, bool *neg_expired_r);
/* Insert key => value into cache. "" value means negative cache entry. */
/* Remove key from cache */
const struct auth_request *request,
const char *key);
#endif