String storeFunction(String(String) storer, b(a) fn, a state)
Arguments
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.fn: The function to call when the state is retrieved.state: The state to pass tofn
Usage
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 retrieveFunction to execute the state later. This lets you make URLs much shorter than is possibly by passing the state directly.
You may need to consider expiring old and unused states from your persistent storage if they have not been retrieved for some time.