KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: 4D Web Server's Page Cache
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: July 13, 2001

4D's Built-In Web Server maintains its own cache of static and semi-dynamic HTML pages. By default, the cache is not used. To enable the cache, go to Database Properties (under the File menu in 4D/4D Server) and click on the Web Server Settings II tab. At the bottom of this page you can set the Page Cache Size - by default, it is zero (no cache). There is also a button that will allow you to clear the cache.

The cache is off by default because this is the setting you will usually want for development. When the cache is off, 4D's Web Server will always read the latest copy of your static/semi-dynamic HTML files off the disk, so any changes you have made are immediately available. If you are using the cache and you change a page that has already been served, you will need to clear the cache before you can expect to see your changed page served by the Web Server.

4D has a special URL for clearing the cache: /4DCACHECLEAR. This allows you to clear the cache from your web browser. If 4D's Web Server is running on your machine, you can clear the cache by entering http://127.0.0.1/4DCACHECLEAR in your web browser's address field.