1ssl_session_cache_api(3)   Erlang Module Definition   ssl_session_cache_api(3)
2
3
4

NAME

6       ssl_session_cache_api - TLS session cache API
7

DESCRIPTION

9       Defines  the  API  for  the  TLS session cache so that the data storage
10       scheme can be replaced by defining a new callback  module  implementing
11       this API.
12

DATA TYPES

14       session_cache_ref() = any()
15
16       session_cache_key() = {partial_key(), ssl:session_id()}
17
18              A key to an entry in the session cache.
19
20       partial_key()
21
22              The  opaque  part of the key. Does not need to be handled by the
23              callback.
24
25       session()
26
27              The session data that is stored for each session.
28

EXPORTS

30       delete(Cache, Key) -> _
31
32              Types:
33
34                 Cache =  session_cache_ref()
35                 Key = session_cache_key()
36
37              Deletes a cache entry. Is only called from  the  cache  handling
38              process.
39
40       foldl(Fun, Acc0, Cache) -> Acc
41
42              Types:
43
44                 Fun = fun()
45                 Acc0 = Acc = term()
46                 Cache =  session_cache_ref()
47
48              Calls  Fun(Elem,  AccIn)  on  successive  elements of the cache,
49              starting with AccIn == Acc0. Fun/2 must return a  new  accumula‐
50              tor,  which is passed to the next call. The function returns the
51              final value of the accumulator. Acc0 is returned if the cache is
52              empty.
53
54       init(Args) -> Cache
55
56              Types:
57
58                 Cache =  session_cache_ref()
59                 Args = proplists:proplist()
60
61              Includes property {role, client | server}. Currently this is the
62              only predefined property, there can also be user-defined proper‐
63              ties.   See   also   application   environment   variable   ses‐
64              sion_cb_init_args.
65
66              Performs possible initializations of the  cache  and  returns  a
67              reference to it that is used as parameter to the other API func‐
68              tions. Is called by the cache handling processes init  function,
69              hence  putting  the  same requirements on it as a normal process
70              init function. This function is called twice when  starting  the
71              SSL  application,  once  with  the role client and once with the
72              role server, as the SSL application must be prepared to take  on
73              both roles.
74
75       lookup(Cache, Key) -> Entry
76
77              Types:
78
79                 Cache =  session_cache_ref()
80                 Key = session_cache_key()
81                 Session = session() | undefined
82
83              Looks up a cache entry. Is to be callable from any process.
84
85       select_session(Cache, PartialKey) -> [Session]
86
87              Types:
88
89                 Cache =  session_cache_ref()
90                 PartialKey =  partial_key()
91                 Session = session()
92
93              Selects  sessions that can be reused. Is to be callable from any
94              process.
95
96       size(Cache) -> integer()
97
98              Types:
99
100                 Cache =  session_cache_ref()
101
102              Returns the number of sessions in the cache. If size exceeds the
103              maximum  number  of  sessions, the current cache entries will be
104              invalidated regardless of their remaining  lifetime.  Is  to  be
105              callable from any process.
106
107       terminate(Cache) -> _
108
109              Types:
110
111                 Cache =  session_cache_ref()
112                   As returned by init/0
113
114              Takes  care  of  possible  cleanup that is needed when the cache
115              handling process terminates.
116
117       update(Cache, Key, Session) -> _
118
119              Types:
120
121                 Cache =  session_cache_ref()
122                 Key = session_cache_key()
123                 Session = session()
124
125              Caches a new session or updates an already cached one.  Is  only
126              called from the cache handling process.
127
128
129
130Ericsson AB                        ssl 9.6.1          ssl_session_cache_api(3)
Impressum