[back]
[Abstract]
[Copyright Notice]
[Contents]
[next]
Smart Cache Manual - Chapter 4
Smart Cache configuration
Smart Cache comes with set of configuration files (*.cnf), which
are configured to useful default values. In many cases is not
necessary to change anything.
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.
Rule: If you don't understand what it does - don't change it! Or change
it, but do no complain if it do not work.
Most important directives to change are:
- cacheroot
- where are your
cached objects stored, best location is in a 1st level directory (i.e. C:\CACHE or
/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:
cacheroot 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
- shutdown_flag (see Stopping Smart Cache/Shutdown flag, section 5.3)
- name of flag file - when a file with this name is detected, the cache will be stopped (if inactive). Example:
shutdown_flag c:\stop
Garbage collection is configured in file gc.cnf
.
Most important directives to change are:
- cache_size
- cache size in MEGABYTES. Bigger is better, but running GC on bigger cache
takes more time. 50 MB is good starting point for everyone. Optimal size depends
of your browsing activity. If you want to get good cache size, set it to
amount of data, which has been stored for 1 month. Install SC and do not run GC
for 1 month, after 1 month check directory size with some utility, which reports
real (also called wasted) directory size, not just sum of bytes. (If you do not
have such program set block_size to 1 and use value from your disk reporter).
- 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 including .cacheinfo file. Some OSes
(OS/2, Win) do not report actual directory size. Directories are about 2-4KB
long and average .cacheinfo has similar size. This size must be at least 2*block_size.
SC will correct this value if set too low, you may set block_size to correct value and leave it as is.
If you are not planing to use off-line browsing feature, set
not_checkable_penalty to some big value (for example *20), 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.
To use the Smart Cache program, requires that your web browser is set up to
use it as a proxy. The proxy hostname will be '127.0.0.1'
(or the name of the host
that Smart Cache is running on), and the port number will be the
one that is used by Smart Cache (default 8080).
If you want to use
Smart Cache as ftp-proxy you must configure
http_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.
- 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->Proxy servers; check box next to HTTP and enter server
and port number
[back]
[Abstract]
[Copyright Notice]
[Contents]
[next]
Smart Cache Manual
0.44
Radim Kolar hsn@cybermail.net