.\" This man page is automatically generated using .\" kayadoc2man from the Kaya development tools and the -xmldocs compile .\" option. Editing it directly is not encouraged. .\" It is under the same license as the source .k file that it was .\" generated from. .TH "Webapp.storeFunction" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" Webapp::storeFunction \- Save application state persistently. .SH "SYNOPSIS" .B String storeFunction( \fIString(String) storer, b(a) fn, a state\fP .B ")" .SH "ARGUMENTS" .PP .B "storer" A function that stores the state (which will be encoded as a String) and returns a key that can be used to retrieve it. .PP .B "fn" The function to call when the state is retrieved. .PP .B "state" The state to pass to \fBfn \fP .SH "DESCRIPTION" .PP This lets you save application state and a handler function to an external source, and get a key to retrieve it later. The storage function should throw an exception if it is unable to store the state. Otherwise it should return a key that can be used with .B "Webapp.retrieveFunction"(3kaya) to execute the state later. This lets you make URLs much shorter than is possibly by passing the state directly. .PP You may need to consider expiring old and unused states from your persistent storage if they have not been retrieved for some time. .SH "AUTHORS" Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ .SH LICENSE The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. .SH "RELATED" .PD 0 .PP .B "Webapp.runHandler"(3kaya) .PP .B "Webapp.retrieveFunction"(3kaya) .PD 0.4v