Cache DirectoryLast Updated: 5/6/2009 | |
| Sections above here: Home » Development » Caching | |
|
Sections below here: Topics in this section: |
In order to improve performance, IntraWeb keeps files that can be cached (files from the Files directory etc) in a directory named Cache. By default this directory is created the first time the application saves a cached file in the system temp folder. You can change the default name and location of the cache directory via ServerController.CacheDir. Important Notes
Global Cache DirectoryThe global cache directory is accessible for all sessions. Files in that directory can be reached from the Web browser like this:http://127.0.0.1:8080/cache/XYZ1234.tmp - where XYZ1234.tmp is a cache file Empty files can be created as follows:uses IWGlobal; That will create a file named XYZ1234.tmp - XYZ is the given prefix, 1234 is a random number, and .tmp cannot be influenced. NewCacheFile()returns the full physical path to the newly created file. User Session Cache DirectoryThe User Cache Directory is private per user session. It is protected by a non decomposable session id. To find the URL to a file in the User Cache Directory, use this approach:uses IWGlobal; The physical location can be determined this way:LFileURL := GServerController.UserCacheDir + 'mytempfile.tmp' A new cache file can be created using this syntax: xFilePathName := GServerController.NewCacheFile('XYZ', true); Additional Info |
(C) 2002-2009 - Atozed Software Ltd. | |