With modern web-based applications, database connections are often pooled, with each connection representing many different users. In order to reduce the overhead of connection functions for such applications, Veil provides a serialisation API. This allows session variables for a connected user to be saved for subsequent re-use. This is particularly effective in combination with pgmemcache
http://pgfoundry.org/projects/pgmemcache/
Only session variables may be serialised.
The following functions comprise the Veil serialisatation API:
This creates a serialised textual representation of the named session variable. The results of this function may be concatenated into a single string, which can be deserialised in a single call to
veil_deserialise()
This takes a serialised representation of one or more variables as created by concatenating the results of
veil_serialise(), and de-serialises them, creating new variables as needed and resetting their values to those they had when they were serialised.
function veil_serialize(text) returns text
Synonym for
veil_serialise()
function veil_deserialize(text) returns text
Synonym for
veil_deserialise()
Next: Veil Control Functions