saf-cache.h File Reference


Detailed Description

ESF Manager Results Cache Facility.

Data structures and other definitions for the ESF Manager Cache.

See also:
saf-cache.c

Definition in file saf-cache.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SafCACHE_H

Enumerations

enum  SafCacheResult {
  SafCACHE_FOUND = 0, SafCACHE_NOTFOUND = 1, SafCACHE_EXPIRED = 2, SafCACHE_INVALID = 3,
  SafCACHE_BADCALL = 10, SafCACHE_INTERNAL = 20, SafCACHE_RESOURCE = 21, SafCACHE_NOTINIT = 22,
  SafCACHE_SHUTDOWN = 23, SafCACHE_TIMEOUT = 24, SafCACHE_R_Invalid, SafCACHE_R_Sizer = (1<<30)
}
 ESF Cache Query Result. More...
enum  SafCacheId { SafCACHE_VERIFY = 1, SafCACHE_AUTH = 2, SafCACHE_I_Invalid, SafCACHE_I_Sizer = (1<<30) }
 ESF Cache Identifier. More...

Functions

mf_uns32 SafCacheInit (void)
 ESF Cache Initialization.


Enumeration Type Documentation

enum SafCacheResult

ESF Cache Query Result.

The result of a cache query. Note that 0 indicates a hit; any other value is an explanation for a miss. In cases where an entry was found but was deemed unusable (eg CACHE_EXPIRED or CACHE_INVALID), the cache will still return the data, but the caller should consider it non-authoritive.

Enumerator:
SafCACHE_FOUND  search successful
SafCACHE_NOTFOUND  no entry found
SafCACHE_EXPIRED  entry found but has expired
SafCACHE_INVALID  entry found but marked invalidated
SafCACHE_BADCALL  caller error
SafCACHE_INTERNAL  internal error
SafCACHE_RESOURCE  resource unavailable
SafCACHE_NOTINIT  caching has not been started
SafCACHE_SHUTDOWN  caching has been shut down
SafCACHE_TIMEOUT  timeout waiting for cache

Definition at line 44 of file saf-cache.h.

enum SafCacheId

ESF Cache Identifier.

Since ESF caching is specifically for the ESF Manager, the caching API identifies specific caches that callers refer to when making updates or queries.

Enumerator:
SafCACHE_VERIFY  cache for VERIFY queries
SafCACHE_AUTH  cache for AUTH queries

Definition at line 68 of file saf-cache.h.


Function Documentation

mf_uns32 SafCacheInit ( void   ) 

ESF Cache Initialization.

This function is invoked by the ESF Manager Initialization routine to initialize the cache facility.

Returns:
An integer value, zero for success and non-zero if initialization failed. See ESF Manager Initialization Return Codes.

Definition at line 119 of file saf-cache.c.

References SafINIT_OK.