[interchange-docs] xmldocs - jon modified 3 files
docs at icdevgroup.org
docs at icdevgroup.org
Wed Apr 23 01:49:36 UTC 2008
User: jon
Date: 2008-04-23 01:49:36 GMT
Modified: refs AutoEnd Autoload Preload
Log:
Give an example for Preload.
Minor cleanup to Autoload and AutoEnd.
Revision Changes Path
1.4 xmldocs/refs/AutoEnd
rev 1.4, prev_rev 1.3
Index: AutoEnd
===================================================================
RCS file: /var/cvs/xmldocs/refs/AutoEnd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -u -r1.3 -r1.4
--- AutoEnd 22 Apr 2008 21:14:54 -0000 1.3
+++ AutoEnd 23 Apr 2008 01:49:36 -0000 1.4
@@ -4,7 +4,7 @@
__NAME__ see also
-AutoEnd,Autoload
+Autoload, Preload
__END__
__NAME__ synopsis
@@ -13,7 +13,7 @@
__NAME__ description
-Specify an Interchange &glos-macro; to be invoked automatically,at the end of every
+Specify an Interchange &glos-macro; to be invoked automatically, at the end of every
page access. This step is performed after all page parsing occurs,
just before the whole transaction ends.
</para><para>
1.5 xmldocs/refs/Autoload
rev 1.5, prev_rev 1.4
Index: Autoload
===================================================================
RCS file: /var/cvs/xmldocs/refs/Autoload,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -u -r1.4 -r1.5
--- Autoload 16 Mar 2008 21:29:27 -0000 1.4
+++ Autoload 23 Apr 2008 01:49:36 -0000 1.5
@@ -4,7 +4,7 @@
__NAME__ see also
-AutoEnd
+Preload, AutoEnd
__END__
__NAME__ synopsis
@@ -35,7 +35,7 @@
open OUT, "> /tmp/out";
print OUT scalar localtime, "\n";
close OUT;
- }
+ }
EOR
]]></programlisting>
<para>
@@ -77,7 +77,7 @@
Autoload <<EOA
[perl]
if ($Session->{browser} =~ /opera/i) {
- $Config->{Special}->{flypage} = 'opera_flypage';
+ $Config->{Special}->{flypage} = 'opera_flypage';
}
[/perl]
EOA
1.2 xmldocs/refs/Preload
rev 1.2, prev_rev 1.1
Index: Preload
===================================================================
RCS file: /var/cvs/xmldocs/refs/Preload,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- Preload 22 Apr 2008 20:39:29 -0000 1.1
+++ Preload 23 Apr 2008 01:49:36 -0000 1.2
@@ -1,5 +1,5 @@
__NAME__ purpose
-specify macro to be executed at the very beginning of every page access
+specify macro to be executed at the very beginning of every request
__END__
__NAME__ synopsis
@@ -12,7 +12,40 @@
__NAME__ description
This is just like &conf-Autoload; as it executes an Interchange &glos-macro;
-but runs at the earliest possible stage of
-page processing, which allows tweaking the session, path, robot status,
-cookie handling, authorization, etc.
-__END__
\ No newline at end of file
+but runs at the earliest possible stage of request processing, which
+allows tweaking the session, path, robot status, cookie handling,
+authorization, etc.
+__END__
+
+__NAME__ example: Simple Preload example
+This example shows how to not create a session for any but explicitly listed URL prefixes.
+<para>
+Put the following in &gcf;:
+<programlisting><![CDATA[
+GlobalSub <<EOR
+sub skip_session {
+ $CGI::values{mv_tmp_session} = 1
+ if $CGI::path_info =~ m{\A/(?:aboutus|contact|info)};
+ return;
+}
+EOR
+]]></programlisting>
+<para>
+Put the following in &ccf;:
+<programlisting><![CDATA[
+Preload skip_session
+]]></programlisting>
+<para>
+For diagnostic purposes, you can put a footer in your bottom page
+template to show the current session ID:
+<programlisting><![CDATA[
+session ID=[data session id]
+]]></programlisting>
+<para>
+Restart Interchange, then visit various pages. Whenever you visit a page
+whose path starts with "aboutus", "contact", or "info", no session will
+be assigned, which you can verify by looking at your diagnostic output
+at the bottom of the page. This can be useful if you require cookies for
+session access, and don't want to incur the overhead of session access
+on pages that don't need it.
+__END__
More information about the docs
mailing list