<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://panoptic.com/mediawiki/aolserver/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tigre</id>
	<title>AOLserver Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://panoptic.com/mediawiki/aolserver/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tigre"/>
	<link rel="alternate" type="text/html" href="https://panoptic.com/wiki/aolserver/Special:Contributions/Tigre"/>
	<updated>2026-04-25T22:42:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5155</id>
		<title>Fastpath</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5155"/>
		<updated>2008-08-19T13:35:43Z</updated>

		<summary type="html">&lt;p&gt;Tigre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Mostly by Tom Jackson''&lt;br /&gt;
&lt;br /&gt;
The purpose of the API is to return a static file.  Fastpath is designed to support return of smallish static content.  It isn't some ancient way of speeding up stuff that was slow, it was for speeding up stuff that was already fast but was easy to make even faster.&lt;br /&gt;
&lt;br /&gt;
If you want to avoid use of fastpath for dynamic content, just set the configuration lower than your dynamic content:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # Fastpath&lt;br /&gt;
 #&lt;br /&gt;
 ns_section &amp;quot;ns/server/${server}/fastpath&amp;quot;&lt;br /&gt;
 ns_param cache                [set cache 10] ;# size per entry or number of entries??&lt;br /&gt;
 ns_param cachemaxsize         [set cachemaxsize [expr 5 * 1024 * 1024]]&lt;br /&gt;
 ns_param cachemaxentry        [expr round(floor($cachemaxsize/$cache))]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or, if the dynamic content is very small, or customized, don't write it to a file in the first place. In general you are probably doing something wrong if you write small content to a file and immediately delete it. You are also likely doing something wrong if you are caching large files.&lt;br /&gt;
&lt;br /&gt;
== Cache keying ==&lt;br /&gt;
&lt;br /&gt;
Fastpath uses a combination of mtime, inode, and size as its unique key.&lt;br /&gt;
&lt;br /&gt;
=== Cache conflicts ===&lt;br /&gt;
&lt;br /&gt;
There are situations where this could produce unexpected results.  If a file served by fastpath is deleted and the inode is reused for a file with the same size whose mtime ends up being the same (either because it was created in the same second as the other one was last modified or through some file recovery mechanism such as tar or zip) ''regardless of filename'' the contents of the old file would be returned by any mechanism using Fastpath, such as [[ns_returnfile]].&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5154</id>
		<title>Fastpath</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5154"/>
		<updated>2008-08-19T13:31:56Z</updated>

		<summary type="html">&lt;p&gt;Tigre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''On the AOLserver list, Tom Jackson wrote:''&lt;br /&gt;
&lt;br /&gt;
The purpose of the API is to return a static file, not one which changes in under a second. It is not a bug to not support code which is guaranteed to be slower than common alternatives.&lt;br /&gt;
&lt;br /&gt;
Fastpath is designed to support return of smallish static content. It isn't some ancient way of speeding up stuff that was slow, it was for speeding up stuff that was already fast but was easy to make even faster.&lt;br /&gt;
&lt;br /&gt;
If you want to avoid use of fastpath, just set the configuration lower than your dynamic content:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # Fastpath&lt;br /&gt;
 #&lt;br /&gt;
 ns_section &amp;quot;ns/server/${server}/fastpath&amp;quot;&lt;br /&gt;
 ns_param cache                [set cache 10] ;# max entries ??&lt;br /&gt;
 ns_param cachemaxsize         [set cachemaxsize [expr 5 * 1024 * 1024]]&lt;br /&gt;
 ns_param cachemaxentry        [expr round(floor($cachemaxsize/$cache))]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or, if the dynamic content is very small, or customized, don't write it to a file in the first place. In general you are probably doing something wrong if you write small content to a file and immediately delete it. You are also likely doing something wrong if you are caching large files.&lt;br /&gt;
&lt;br /&gt;
== Cache keying ==&lt;br /&gt;
&lt;br /&gt;
Fastpath uses a combination of mtime, inode, and size as its unique key.&lt;br /&gt;
&lt;br /&gt;
=== Cache conflicts ===&lt;br /&gt;
&lt;br /&gt;
There are situations where this could produce unexpected results.  If a file served by fastpath is deleted and the inode is reused for a file with the same size whose mtime ends up being the same (either because it was created in the same second as the other one was last modified or through some file recovery mechanism such as tar or zip) ''regardless of filename'' the contents of the old file would be returned by any mechanism using Fastpath, such as [[ns_returnfile]].&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_returnfile&amp;diff=5153</id>
		<title>Ns returnfile</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_returnfile&amp;diff=5153"/>
		<updated>2008-08-19T13:24:18Z</updated>

		<summary type="html">&lt;p&gt;Tigre: /* Caveat programmor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ns_returnfile 200 &amp;quot;application/zip&amp;quot; $filepath&lt;br /&gt;
 ns_returnfile 200 [ns_guesstype $file] $filepath&lt;br /&gt;
&lt;br /&gt;
==== Caveat programmor ====&lt;br /&gt;
&lt;br /&gt;
ns_returnfile uses [[fastpath]] internally, so care should be taken when using it to return dynamically generated files.  A better practice if dealing with dynamic data in the filesystem would probably be to use [[ns_return]] instead.  For example:&lt;br /&gt;
&lt;br /&gt;
 set fd [open $myfile]&lt;br /&gt;
 ns_unlink $myfile; # So that nothing else can access the file from the filesystem&lt;br /&gt;
 ns_return 200 [ns_guesstype $myfile] [read $fd]&lt;br /&gt;
 close $fd&lt;br /&gt;
&lt;br /&gt;
==== Want to name the file returned? ====&lt;br /&gt;
&lt;br /&gt;
ns_set update [ns_conn outputheaders] content-disposition &amp;quot;attachment; filename=1.abc&amp;quot;&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_returnfile&amp;diff=5152</id>
		<title>Ns returnfile</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_returnfile&amp;diff=5152"/>
		<updated>2008-08-19T13:20:07Z</updated>

		<summary type="html">&lt;p&gt;Tigre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ns_returnfile 200 &amp;quot;application/zip&amp;quot; $filepath&lt;br /&gt;
 ns_returnfile 200 [ns_guesstype $file] $filepath&lt;br /&gt;
&lt;br /&gt;
==== Caveat programmor ====&lt;br /&gt;
&lt;br /&gt;
ns_returnfile uses [[fastpath]] internally, so care should be taken when using it to return dynamically generated files.  A better practice if dealing with dynamic data in the filesystem would probably be to use [[ns_returnfd]] instead.&lt;br /&gt;
&lt;br /&gt;
Also, see [[ns_return]]&lt;br /&gt;
&lt;br /&gt;
==== Want to name the file returned? ====&lt;br /&gt;
&lt;br /&gt;
ns_set update [ns_conn outputheaders] content-disposition &amp;quot;attachment; filename=1.abc&amp;quot;&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5151</id>
		<title>Fastpath</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5151"/>
		<updated>2008-08-19T13:17:49Z</updated>

		<summary type="html">&lt;p&gt;Tigre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On the AOLserver list, Tom Jackson wrote&lt;br /&gt;
&lt;br /&gt;
The purpose of the API is to return a static file, not one which changes in under a second. It is not a bug to not support code which is guaranteed to be slower than common alternatives.&lt;br /&gt;
&lt;br /&gt;
Fastpath is designed to support return of smallish static content. It isn't some ancient way of speeding up stuff that was slow, it was for speeding up stuff that was already fast but was easy to make even faster.&lt;br /&gt;
&lt;br /&gt;
If you want to avoid use of fastpath, just set the configuration lower than your dynamic content:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # Fastpath&lt;br /&gt;
 #&lt;br /&gt;
 ns_section &amp;quot;ns/server/${server}/fastpath&amp;quot;&lt;br /&gt;
 ns_param cache                [set cache 10] ;# max entries ??&lt;br /&gt;
 ns_param cachemaxsize         [set cachemaxsize [expr 5 * 1024 * 1024]]&lt;br /&gt;
 ns_param cachemaxentry        [expr round(floor($cachemaxsize/$cache))]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or, if the dynamic content is very small, or customized, don't write it to a file in the first place. In general you are probably doing something wrong if you write small content to a file and immediately delete it. You are also likely doing something wrong if you are caching large files.&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_returnfile&amp;diff=5150</id>
		<title>Ns returnfile</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_returnfile&amp;diff=5150"/>
		<updated>2008-08-19T13:10:26Z</updated>

		<summary type="html">&lt;p&gt;Tigre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ns_returnfile 200 &amp;quot;application/zip&amp;quot; $filepath&lt;br /&gt;
 ns_returnfile 200 [ns_guesstype $file] $filepath&lt;br /&gt;
&lt;br /&gt;
ns_returnfile uses [[fastpath]] internally, so care should be taken when using it to return dynamically generated files.&lt;br /&gt;
&lt;br /&gt;
For now, see [[ns_return]]&lt;br /&gt;
&lt;br /&gt;
Want to name the file?&lt;br /&gt;
&lt;br /&gt;
ns_set update [ns_conn outputheaders] content-disposition &amp;quot;attachment; filename=1.abc&amp;quot;&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5149</id>
		<title>Fastpath</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Fastpath&amp;diff=5149"/>
		<updated>2008-08-19T13:09:48Z</updated>

		<summary type="html">&lt;p&gt;Tigre: New page: On the AOLserver list, Tom Jacksov wrote  The purpose of the API is to return a static file, not one which changes in under a second. It is not a bug to not support code which is guarantee...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On the AOLserver list, Tom Jacksov wrote&lt;br /&gt;
&lt;br /&gt;
The purpose of the API is to return a static file, not one which changes in under a second. It is not a bug to not support code which is guaranteed to be slower than common alternatives.&lt;br /&gt;
&lt;br /&gt;
Fastpath is designed to support return of smallish static content. It isn't some ancient way of speeding up stuff that was slow, it was for speeding up stuff that was already fast but was easy to make even faster.&lt;br /&gt;
&lt;br /&gt;
If you want to avoid use of fastpath, just set the configuration lower than your dynamic content:&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 # Fastpath&lt;br /&gt;
 #&lt;br /&gt;
 ns_section &amp;quot;ns/server/${server}/fastpath&amp;quot;&lt;br /&gt;
 ns_param cache                [set cache 10] ;# max entries ??&lt;br /&gt;
 ns_param cachemaxsize         [set cachemaxsize [expr 5 * 1024 * 1024]]&lt;br /&gt;
 ns_param cachemaxentry        [expr round(floor($cachemaxsize/$cache))]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or, if the dynamic content is very small, or customized, don't write it to a file in the first place. In general you are probably doing something wrong if you write small content to a file and immediately delete it. You are also likely doing something wrong if you are caching large files.&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_ictl&amp;diff=5143</id>
		<title>Ns ictl</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_ictl&amp;diff=5143"/>
		<updated>2008-05-21T21:15:17Z</updated>

		<summary type="html">&lt;p&gt;Tigre: Formatting fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_ictl.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_ictl - Manipulate and introspect Tcl interpreter internals&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_ictl''' ''option ?arg arg ...?''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command provides a mechanism to control Tcl interpreter internals.&lt;br /&gt;
&lt;br /&gt;
: The legal ''option''s (which may be abbreviated) are:&lt;br /&gt;
* '''ns_ictl addmodule''' ''module''&lt;br /&gt;
&lt;br /&gt;
: Adds a module to the list of modules, and returns the new list as the result.&lt;br /&gt;
&lt;br /&gt;
: This command simply appends the ''module'' to the list.  It doesn't perform any loading of modules themselves.&lt;br /&gt;
&lt;br /&gt;
* '''ns_ictl cancel''' ''threadId''&lt;br /&gt;
: Sends an asynchronous interrupt request to the specified thread, canceling any script currently executing on any AOLserver created interpreter (note the interrupt is not virtual-server specific).&lt;br /&gt;
: This command utilizes the facilities of Tcl_AsyncMark() to mark as ready a callback registered with Tcl_AsyncCreate(). The callback places an error message in the interpreter result and returns TCL_ERROR to unwind the call stack. The underlying Tcl facility has limitations, e.g., the interrupt will only be noticed when Tcl checks via Tcl_AsyncReady() calls between commands and the interrupt can be caught with a &amp;quot;catch&amp;quot; command.&lt;br /&gt;
: See the man page for Tcl_AsyncCreate() for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''ns_ictl cleanup'''&lt;br /&gt;
&lt;br /&gt;
: Runs all of the cleanup traces, and does any other necessary interpreter cleanup.&lt;br /&gt;
* '''ns_ictl epoch'''&lt;br /&gt;
&lt;br /&gt;
: Returns the current epoch for the interpreter.&lt;br /&gt;
* '''ns_ictl get'''&lt;br /&gt;
&lt;br /&gt;
: Returns the script that is executed at interpreter initialization time.&lt;br /&gt;
* '''ns_ictl getmodules'''&lt;br /&gt;
&lt;br /&gt;
: Returns a list of currently loaded modules.&lt;br /&gt;
* '''ns_ictl save''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Replaces the current interpreter initialization script with the new ''script''.&lt;br /&gt;
* '''ns_ictl update'''&lt;br /&gt;
&lt;br /&gt;
: Update the state (procs, namespaces) of an interpreter.&lt;br /&gt;
* '''ns_ictl oncreate''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter create time.&lt;br /&gt;
* '''ns_ictl oncleanup''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter cleanup time.&lt;br /&gt;
* '''ns_ictl oninit''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter init time.  This can only be used during server initialization phase of server startup.&lt;br /&gt;
* '''ns_ictl ondelete''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter delete time.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
    % ns_ictl epoch&lt;br /&gt;
    1&lt;br /&gt;
&lt;br /&gt;
    % ns_ictl getmodules&lt;br /&gt;
    nsdb nslog nscp&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
: [[ns_cleanup]], [[ns_init]], [[ns_markfordelete]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_ictl&amp;diff=5142</id>
		<title>Ns ictl</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_ictl&amp;diff=5142"/>
		<updated>2008-05-21T21:14:17Z</updated>

		<summary type="html">&lt;p&gt;Tigre: ns_ictl cancel, as reported by Nathan Folkman on the AOLserver list, 2006-06-23&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_ictl.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_ictl - Manipulate and introspect Tcl interpreter internals&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_ictl''' ''option ?arg arg ...?''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command provides a mechanism to control Tcl interpreter internals.&lt;br /&gt;
&lt;br /&gt;
: The legal ''option''s (which may be abbreviated) are:&lt;br /&gt;
* '''ns_ictl addmodule''' ''module''&lt;br /&gt;
&lt;br /&gt;
: Adds a module to the list of modules, and returns the new list as the result.&lt;br /&gt;
&lt;br /&gt;
: This command simply appends the ''module'' to the list.  It doesn't perform any loading of modules themselves.&lt;br /&gt;
&lt;br /&gt;
* '''ns_ictl cancel''' ''threadId''&lt;br /&gt;
: Sends an asynchronous interrupt request to the specified thread, canceling any script currently executing on any AOLserver created interpreter (note the interrupt is not virtual-server specific).&lt;br /&gt;
This command utilizes the facilities of Tcl_AsyncMark() to mark as ready a callback registered with Tcl_AsyncCreate(). The callback places an error message in the interpreter result and returns TCL_ERROR to unwind the call stack. The underlying Tcl facility has limitations, e.g., the interrupt will only be noticed when Tcl checks via Tcl_AsyncReady() calls between commands and the interrupt can be caught with a &amp;quot;catch&amp;quot; command.&lt;br /&gt;
See the man page for Tcl_AsyncCreate() for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''ns_ictl cleanup'''&lt;br /&gt;
&lt;br /&gt;
: Runs all of the cleanup traces, and does any other necessary interpreter cleanup.&lt;br /&gt;
* '''ns_ictl epoch'''&lt;br /&gt;
&lt;br /&gt;
: Returns the current epoch for the interpreter.&lt;br /&gt;
* '''ns_ictl get'''&lt;br /&gt;
&lt;br /&gt;
: Returns the script that is executed at interpreter initialization time.&lt;br /&gt;
* '''ns_ictl getmodules'''&lt;br /&gt;
&lt;br /&gt;
: Returns a list of currently loaded modules.&lt;br /&gt;
* '''ns_ictl save''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Replaces the current interpreter initialization script with the new ''script''.&lt;br /&gt;
* '''ns_ictl update'''&lt;br /&gt;
&lt;br /&gt;
: Update the state (procs, namespaces) of an interpreter.&lt;br /&gt;
* '''ns_ictl oncreate''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter create time.&lt;br /&gt;
* '''ns_ictl oncleanup''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter cleanup time.&lt;br /&gt;
* '''ns_ictl oninit''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter init time.  This can only be used during server initialization phase of server startup.&lt;br /&gt;
* '''ns_ictl ondelete''' ''script''&lt;br /&gt;
&lt;br /&gt;
: Registers a ''script'' to be executed at Tcl interpreter delete time.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
    % ns_ictl epoch&lt;br /&gt;
    1&lt;br /&gt;
&lt;br /&gt;
    % ns_ictl getmodules&lt;br /&gt;
    nsdb nslog nscp&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
: [[ns_cleanup]], [[ns_init]], [[ns_markfordelete]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Tigre</name></author>
		
	</entry>
</feed>