1Webapp.storeFunction(3kaya) Kaya module reference Webapp.storeFunction(3kaya)
2
3
4
6 Webapp::storeFunction - Save application state persistently.
7
9 String storeFunction( String(String) storer, b(a) fn, a state )
10
12 storer A function that stores the state (which will be encoded as a
13 String) and returns a key that can be used to retrieve it.
14
15 fn The function to call when the state is retrieved.
16
17 state The state to pass to fn
18
20 This lets you save application state and a handler function to an
21 external source, and get a key to retrieve it later. The storage func‐
22 tion should throw an exception if it is unable to store the state. Oth‐
23 erwise it should return a key that can be used with Webapp.retrieve‐
24 Function (3kaya) to execute the state later. This lets you make URLs
25 much shorter than is possibly by passing the state directly.
26
27 You may need to consider expiring old and unused states from your per‐
28 sistent storage if they have not been retrieved for some time.
29
31 Kaya standard library by Edwin Brady, Chris Morris and others
32 (kaya@kayalang.org). For further information see http://kayalang.org/
33
35 The Kaya standard library is free software; you can redistribute it
36 and/or modify it under the terms of the GNU Lesser General Public
37 License (version 2.1 or any later version) as published by the Free
38 Software Foundation.
39
41 Webapp.runHandler (3kaya)
42 Webapp.retrieveFunction (3kaya)
43
44
45
46Kaya December 2010 Webapp.storeFunction(3kaya)