PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Importance of cached sessions
  • Principle of a request for displaying an AWP page
  • Benefit of cached sessions
  • Implementation
  • The different steps
  • Enabling the detection of errors specific to the cached sessions
  • Correcting the errors specific to the cached sessions
  • Enabling the cached sessions on the server
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A cached session is a session of a Web site (or webservice) automatically started on the Web server from the WEBDEV Application Server.
The cached sessions are used to speed up the display of pages by performing long processes in advance: connecting to databases, loading page configurations, ...
The cached sessions can be used with the standard WEBDEV sites, the AWP WEBDEV sites and the WEBDEV webservices. This operating mode is identical in any case.
Note: The cached sessions are allowed on the unlimited server or on the 10-connection server. They are not enabled on the development computer.
Importance of cached sessions

Principle of a request for displaying an AWP page

To understand the importance of cached sessions (especially for the AWP pages), let's take a look at the principle of AWP pages.
When a Web user performs a request from an AWP page, the following operations are performed:
  1. The request is transmitted from the browser to the Web server.
  2. The Web server studies the request.
  3. The Web server transmits the request to the WEBDEV application server.
  4. The WEBDEV application server:
    • loads the project corresponding to the page.
    • runs the initialization code of project, then the page code.
    • returns the response to the Web server.
  5. The Web server returns the response to the browser.

Benefit of cached sessions

When displaying an AWP page, each call to the WEBDEV application server is entirely independent.
Consequence: For each request (and therefore for each change of page, for each Ajax call), the WEBDEV application server re-loads the project and re-runs the initialization code. The initialization code of project often runs "long" operations:
  • connecting to the database,
  • loading configuration files,
  • ...
The cached sessions ask the WEBDEV application server to perform these operations in advance.
Therefore, when the request of the Web user reaches the WEBDEV application server, the application server only has to run the request and to return the result.
Implementation

The different steps

To implement the cached sessions in a WEBDEV project:
  1. Enable the detection of errors specific to the cached sessions.
  2. Correct the errors by using the "Initializing the project after connection to the site" process.
  3. Enable the cached sessions on the WEBDEV application server.

Enabling the detection of errors specific to the cached sessions

If your project is using the cached sessions, some functions can no longer be used when initializing the project.
To find out the possible problems that may occur when using the cached sessions, all you have to do is enable the mode for detecting the errors specific to the cached sessions:
  1. Display the "Compilation errors" pane if necessary: on the "Home" pane, in the "Environment" group, expand "Panes" and select "Compilation errors".
  2. In the pane of compilation errors, click .
  3. The list of errors is displayed.
Note: The detection of errors can also be enabled from the description window of project:
  1. On the "Project" pane, in the "Project" group, click "Description".
  2. In the "Compilation" tab, check "Display the compilation errors specific to cached sessions".
  3. Validate.
  4. The list of errors is displayed in the error pane.

Correcting the errors specific to the cached sessions

The errors specific to the cached sessions indicate the WLanguage functions not allowed in the initialization process of project.
These functions are as follows:
Versions 09 and later
ASPDisplay
New in version 09
ASPDisplay
ASPDisplay
Calls an external ASP script and returns the result page in the current browser window.
Versions 09 and later
BrowserIPAddress
New in version 09
BrowserIPAddress
BrowserIPAddress
Returns the IP address of the computer of the Web user connected to the WEBDEV site.
Versions 09 and later
BrowserName
New in version 09
BrowserName
BrowserName
Returns the name of the browser of the Web user ("user agent").
Versions 16 and later
BrowserPlatform
New in version 16
BrowserPlatform
BrowserPlatform
Returns the platform of the browser used by the Web user.
Versions 16 and later
BrowserType
New in version 16
BrowserType
BrowserType
Returns the type of browser used by the Web user.
Versions 16 and later
BrowserVersion
New in version 16
BrowserVersion
BrowserVersion
Returns the version of the browser used by the Web user.
Versions 12 and later
CancelAWPContext
New in version 12
CancelAWPContext
CancelAWPContext
Deletes from the AWP context a variable that was added by DeclareAWPContext.
Versions 16 and later
CancelWebserviceContext
New in version 16
CancelWebserviceContext
CancelWebserviceContext
Deletes from the webservice context a variable added by DeclareWebserviceContext.
Versions 16 and later
CertificateClientInfo
New in version 16
CertificateClientInfo
CertificateClientInfo
Returns information about the certificate used by the client computer.
Versions 12 and later
ConfigureAWPContext
New in version 12
ConfigureAWPContext
ConfigureAWPContext
Configures the operating mode of AWP context.
Versions 09 and later
Confirm
New in version 09
Confirm
Confirm
Displays a message in a standard dialog box that proposes "Yes", "No", "Cancel" and returns the user's choice.
Versions 09 and later
ContextClose
New in version 09
ContextClose
ContextClose
Closes a page context.
Versions 09 and later
ContextOpen
New in version 09
ContextOpen
ContextOpen
Opens a new page context without returning the information to the browser.
Versions 09 and later
CookieRead
New in version 09
CookieRead
CookieRead
Retrieves the value of a cookie saved on the computer of Web user.
Versions 10 and later
DeclareAWPContext
New in version 10
DeclareAWPContext
DeclareAWPContext
Used to declare a list of variables whose value will be persistent between the successive displays of AWP pages.
Versions 16 and later
DeclareWebserviceContext
New in version 16
DeclareWebserviceContext
DeclareWebserviceContext
Used to declare a list of variables whose value will be persistent between the successive calls to a Webservice.
Versions 18 and later
ExecuteDelayedProcedure
New in version 18
ExecuteDelayedProcedure
ExecuteDelayedProcedure
Runs a delayed procedure (in the WEBDEV application server).
Versions 09 and later
FileDisplay
New in version 09
FileDisplay
FileDisplay
Displays a file in the browser of Web user.
Versions 09 and later
FramesetDisplay
New in version 09
FramesetDisplay
FramesetDisplay
Displays a WEBDEV frameset in the browser of Web user.
Versions 09 and later
FramesetRefresh
New in version 09
FramesetRefresh
FramesetRefresh
Refreshes a frameset displayed in the browser of the Web user from the context found on the server.
Versions 09 and later
FramesetUse
New in version 09
FramesetUse
FramesetUse
Displays a WEBDEV frameset in the browser of Web user and closes all the current page and frameset contexts.
Versions 18 and later
FreeAWPContext
New in version 18
FreeAWPContext
FreeAWPContext
Frees the AWP context in advance (on disk) to allow the other call on the same AWP context to be processed in parallel.
Versions 14 and later
GglConnect
New in version 14
GglConnect
GglConnect
Used to perform an authentication beside a Google server.
Versions 09 and later
gpwOpen
New in version 09
gpwOpen
gpwOpen
Opens the login window or page of user groupware.
Versions 12 and later
IdentifierAWPContext
New in version 12
IdentifierAWPContext
IdentifierAWPContext
Returns the identifier of AWP context.
Versions 09 and later
ImageArea
New in version 09
ImageArea
ImageArea
Returns the number of the image area clicked by the Web user.
Versions 09 and later
ImageXPos
New in version 09
ImageXPos
ImageXPos
Returns the horizontal position (X) of the mouse cursor in relation to the specified Image control.
Versions 09 and later
ImageYPos
New in version 09
ImageYPos
ImageYPos
Returns the vertical position (Y) of the mouse cursor in relation to the specified Image control.
Versions 09 and later
OKCancel
New in version 09
OKCancel
OKCancel
Displays a message in a standard dialog box that proposes "OK" and "Cancel" and returns the user's choice.
Versions 12 and later
PageCloseDialog
New in version 12
PageCloseDialog
PageCloseDialog
Closes the current page. This page was opened by PageDisplayDialog. A return value can be returned to the calling page.
Versions 09 and later
PageDisplay
New in version 09
PageDisplay
PageDisplay
Displays a page of the site in the browser of the Web user.
Versions 12 and later
PageDisplayDialog
New in version 12
PageDisplayDialog
PageDisplayDialog
Displays a page in modal mode. This function is used to establish a dialog with the user. The page is displayed in the foreground while the opening page is displayed in the background, grayed by the DDW mechanism.
Versions 09 and later
PageParameter
New in version 09
PageParameter
PageParameter
Returns the value of a parameter passed to the current page.
Versions 09 and later
PageRefresh
New in version 09
PageRefresh
PageRefresh
Refreshes a page displayed in the browser of Web user from the context found on the server.
Versions 09 and later
PageUse
New in version 09
PageUse
PageUse
Displays a WEBDEV page in the browser of the Web user and closes all the current page contexts.
Versions 09 and later
PHPDisplay
New in version 09
PHPDisplay
PHPDisplay
Calls an external PHP script and returns the result page in the current browser window.
Versions 14 and later
rssDisplay
New in version 14
rssDisplay
rssDisplay
Builds a RSS stream and returns the content of the RSS stream to the client.
Versions 09 and later
ScriptDisplay
New in version 09
ScriptDisplay
ScriptDisplay
Calls an external script or page (.php, .asp, .mhtml or.mht) and returns the result page in the current browser window.
Versions 09 and later
StringDisplay
New in version 09
StringDisplay
StringDisplay
Returns a specific string (or a buffer) to the client browser in response to a request.
Versions 09 and later
UploadCopyFile
New in version 09
UploadCopyFile
UploadCopyFile
Saves on the server a file "uploaded" by the Web user. This upload may have been performed:
  • via an "Upload" edit control.
  • via a single-file or multi-file Upload control.
Versions 09 and later
UploadFileName
New in version 09
UploadFileName
UploadFileName
Returns the name of a file "uploaded" by the Web user. This upload may have been performed:
  • via an "Upload" edit control.
  • via a single-file or multi-file Upload control.
Versions 16 and later
WebserviceClientIPAddress
New in version 16
WebserviceClientIPAddress
WebserviceClientIPAddress
Returns the IP address of the computer using and calling the Webservice.
Versions 09 and later
YesNo
New in version 09
YesNo
YesNo
Displays a message in a standard dialog box that proposes "Yes" and "No" and returns the user's choice.
To manage the cached sessions, two processes are now associated with the project:
  • the "Initializing the project" process, run before the request reaches the WEBDEV application server. This code is run when starting the cached session.
  • the "Initializing the project after connection to the site" process, run when the WEBDEV application server processes the request.
To correct the errors specific to the cached sessions, all you have to do is move the corresponding code into the "Initializing the project after connection to the site" process.
When the site is compatible with the mechanism of cached sessions, you have the ability to deploy it and to enable the cached sessions on the WEBDEV application server.

Enabling the cached sessions on the server

To enable the cached sessions for a site:
  1. Start the WEBDEV administrator.
  2. Display the "Configuration" tab.
  3. Check "Allow the cached sessions". By default, all the sites and webservices have a number of cached sessions equal to 0.
  4. Select the site or the webservice to configure ("Sites" tab ot "Webservice" tab).
  5. In the site parameters ("Parameters" option of "Sites" tab) or Webservice ("Parameters" option of "Webservices" tab), specify the number of cached sessions to use.
  6. Validate.
Note: The cached sessions are counted in the total number of connections to the site (or to the Webservice). This information must be taken into account when configuring the WEBDEV application server.
Minimum required version
  • Version 20
Comments
Click [Add] to post a comment