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 (pre TLS-1.3) so that the
10       data storage scheme can be replaced by defining a new  callback  module
11       implementing 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       Module: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       Module: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          Note:
55              Since  OTP-23.3  this  functions is only used on the client side
56              and does not need to implemented for a server cache.
57
58
59       Module:init(Args) -> Cache
60
61              Types:
62
63                 Cache =  session_cache_ref()
64                 Args = proplists:proplist()
65
66              Includes property {role, client | server}. Currently this is the
67              only predefined property, there can also be user-defined proper‐
68              ties.   See   also   application   environment   variable   ses‐
69              sion_cb_init_args.
70
71              Performs  possible  initializations  of  the cache and returns a
72              reference to it that is used as parameter to the other API func‐
73              tions.  Is called by the cache handling processes init function,
74              hence putting the same requirements on it as  a  normal  process
75              init  function.  This function is called twice when starting the
76              SSL application, once with the role client  and  once  with  the
77              role  server, as the SSL application must be prepared to take on
78              both roles.
79
80       Module:lookup(Cache, Key) -> Entry
81
82              Types:
83
84                 Cache =  session_cache_ref()
85                 Key = session_cache_key()
86                 Session = session() | undefined
87
88              Looks up a cache entry. Is to be callable from any process.
89
90       Module:select_session(Cache, PartialKey) -> [Session]
91
92              Types:
93
94                 Cache =  session_cache_ref()
95                 PartialKey =  partial_key()
96                 Session = session()
97
98              Selects sessions that can be reused, that is sessions  that  in‐
99              clude PartialKey in its key. Is to be callable from any process.
100
101          Note:
102              Since  OTP-23.3  This  functions is only used on the client side
103              and does not need to implemented for a server cache.
104
105
106       Module:size(Cache) -> integer()
107
108              Types:
109
110                 Cache =  session_cache_ref()
111
112              Returns the number of sessions in the cache. If size exceeds the
113              maximum  number  of  sessions, the current cache entries will be
114              invalidated regardless of their remaining  lifetime.  Is  to  be
115              callable from any process.
116
117       Module:terminate(Cache) -> _
118
119              Types:
120
121                 Cache =  session_cache_ref()
122                   As returned by init/0
123
124              Takes  care  of  possible  cleanup that is needed when the cache
125              handling process terminates.
126
127       Module:update(Cache, Key, Session) -> _
128
129              Types:
130
131                 Cache =  session_cache_ref()
132                 Key = session_cache_key()
133                 Session = session()
134
135              Caches a new session or updates an already cached one.  Is  only
136              called from the cache handling process.
137
138
139
140Ericsson AB                      ssl 10.7.3.1         ssl_session_cache_api(3)
Impressum