company logo

Client :: cacheConnection - Cache connection

In order to reuse opened database access handles when reconnecting a client to the server, connections may be cached. In order to cache a connection, the server option CACHE.CONNECTIONS has to be set to YES. The connection string passed in sConnectionName must be unique in order to identify different clients properly.


Notes:

Connections are cached automatically, when the option CONNECTION_NAME has been set before connecting to the server (connect) or when it has been defined in the application's configuration file.

Implementation details

Client  :: cacheConnection ( odaba::String &sConnectionName )
  • sConnectionName - Connection name

    This is a unique connection name assigned to the connection. When caching connections (e.g. when running WEB applications), connections are not closed when a client disconnects. The connection name is used for fast client reconnect. Moreover, the client session on the server side is able to maintain client states while the client is not closed.