[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ 16 ] [ A ] [ B ] [ next ]


Smart Cache Manual
Chapter 4 - Smart Cache configuration


4.1 Quick Smart Cache configuration

Smart Cache comes with set of configuration files (*.cnf), which are preconfigured to useful default values. You must copy them from samples subdirectory. You can unpack newer versions of scache over your old version without your customized configuration files being overwritten.

In many cases is not necessary to change anything. Smart Cache has builtin defaults which are used when configuration files are unavailable.

Edit configuration file scache.cnf with any ASCII editor (for example ViM or Notepad in Windows). Configuration directives are commented. If you don't understand them, try ask somebody who does. I have received very few requests for explaining within the entire history of this product.

Most important directives to change are:

cache_dir

where are your cached objects stored. This is not main directory in which Smart Cache is installed. Best location is in a 1st level directory (i.e. C:\CACHE or /var/scache under Unix) because some URLs have very long names. Directory must be located on filesystem with Long Names support. OS/2 with FAT disk will not work. Example:

     cache_dir c:\cache
http_proxy

If you use an ISP's proxy server (which is very recommended), set it in the http_proxy directive. Example:

     http_proxy 192.108.56.10 3198

4.2 Configuration of garbage collection

Garbage collection is configured in file gc.cnf. Most important directives to change are:

cache_swap_size

cache size. 100 MB is good starting point for everyone. Optimal size depends of your browsing activity. See Choosing a good cachesize, Section 7.1.

block_size

size of one disk allocation unit (also called cluster) in bytes. GC needs this for computing real diskspace, which is used by file.

average_directory_size

Average size of one directory. Some OSes (OS/2, Win) do not report actual directory size. Directories are about 2-4KB long. You can get this value yourself: Check how many bytes are used (how many diskfree space is gone) after creating new directory and several (10) files with zero length in it. Got it?

If you are not planing to use off-line browsing feature, set not_checkable_penalty to some big value i.e. *20 (makes them expire 20 times faster) or even better =2 (delete them after 2 days), this makes faster cleaning of dynamic-generated objects.

If you are have some favourite web pages, which you like to keep in cache longer (for offline browsing), you can tell GC to expire such pages slower than others.

     urlmask http://www.javaworld.com/* /100

Javaworld magazine will expire 100 times slower than other pages. See also How garbage collection works, Section 7.3.


4.3 Configuring a Web browser

To use the Smart Cache program, requires that your web browser is set up to use it as a proxy for HTTP protocol. The proxy hostname will be '127.0.0.1' (or the name of the host that Smart Cache is running on or bindaddress), and the port number will be the one that is used by Smart Cache (default 8080).

You can also use Smart Cache as proxy for HTTPS protocol. It is not too useful, proxy can only block your connections to certain servers. HTTPS pages can not be cached due to encryption.

If you want to use Smart Cache as ftp-proxy you must configure http_proxy or ftp_proxy in scache.cnf configuration file.

Netscape V1

In the Options->Preferences dialog window, enter localhost as the http and FTP proxies and 8080 as the port numbers.

Netscape V2,3

In the Options->Network Preferences dialog window under the Proxies tab select the "Manual Proxy Configuration" option and enter localhost as the http and FTP proxies and 8080 as the port numbers. In Netscape V2 use also Options->Save Options to save your settings.

Netscape V4

In the Edit->Preferences dialog window select Advanced and then Proxies, select the "Manual Proxy Configuration" option and enter localhost as the http and FTP proxies and 8080 as the port numbers.

Mozilla

Like Netscape V4

Internet Explorer 2

View->Options->Proxy

Internet Explorer 3,4

View->Options->Connections; tick Connect through proxy server box;Settings;Enter details in HTTP box, with port number in second; OK

Internet Explorer running on Windows NT

Control Panel->Internet->Advanced->Proxy

Mosaic for Windows

Options->Preferences->Proxy, Enter details to HTTP field.

Mosaic/X V2.6, Lynx, Grail, Arena, Emacs-W3:

Set the environment variables http_proxy and ftp_proxy to http://localhost:8080/

Opera

Preferences->Advanced->Connection->Proxy servers; check box next to HTTP and enter server and port number


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ 16 ] [ A ] [ B ] [ next ]


Smart Cache Manual

0.94

Radim Kolar hsn_nospam_at.sendmail.dot.cz