.TH ssl_session_cache_api 3erl "ssl 5.3.6" "Ericsson AB" "Erlang Module Definition" .SH NAME ssl_session_cache_api \- Defines the API for the TLS session cache so that the data storage scheme can be replaced by defining a new callback module implementing this API. .SH "COMMON DATA TYPES" .LP The following data types are used in the functions below: .LP \fIcache_ref() = opaque()\fR\& .LP \fIkey() = {partialkey(), session_id()}\fR\& .LP \fIpartialkey() = opaque()\fR\& .LP \fIsession_id() = binary()\fR\& .LP \fIsession() = opaque()\fR\& .SH EXPORTS .LP .B delete(Cache, Key) -> _ .br .RS .LP Types: .RS 3 Cache = cache_ref() .br Key = key() .br .RE .RE .RS .LP Deletes a cache entry\&. Will only be called from the cache handling process\&. .RE .LP .B foldl(Fun, Acc0, Cache) -> Acc .br .RS .LP Types: .RS 3 .br .RE .RE .RS .LP Calls Fun(Elem, AccIn) on successive elements of the cache, starting with AccIn == Acc0\&. Fun/2 must return a new accumulator which is passed to the next call\&. The function returns the final value of the accumulator\&. Acc0 is returned if the cache is empty\&. .RE .LP .B init() -> opaque() .br .RS .LP Types: .RS 3 .br .RE .RE .RS .LP Performs possible initializations of the cache and returns a reference to it that will be used as parameter to the other api functions\&. Will be called by the cache handling processes init function, hence putting the same requirements on it as a normal process init function\&. .RE .LP .B lookup(Cache, Key) -> Entry .br .RS .LP Types: .RS 3 Cache = cache_ref() .br Key = key() .br Entry = session() | undefined .br .RE .RE .RS .LP Looks up a cache entry\&. Should be callable from any process\&. .RE .LP .B select_session(Cache, PartialKey) -> [session()] .br .RS .LP Types: .RS 3 Cache = cache_ref() .br PartialKey = partialkey() .br Session = session() .br .RE .RE .RS .LP Selects sessions that could be reused\&. Should be callable from any process\&. .RE .LP .B terminate(Cache) -> _ .br .RS .LP Types: .RS 3 Cache = term() - as returned by init/0 .br .RE .RE .RS .LP Takes care of possible cleanup that is needed when the cache handling process terminates\&. .RE .LP .B update(Cache, Key, Session) -> _ .br .RS .LP Types: .RS 3 Cache = cache_ref() .br Key = key() .br Session = session() .br .RE .RE .RS .LP Caches a new session or updates a already cached one\&. Will only be called from the cache handling process\&. .RE