[back]
[Abstract]
[Copyright Notice]
[Contents]
[next]
Smart Cache Manual - Chapter 11
FAQ
- May I disable my browser internal cache?
- It is recommended to disable the browser disk cache and use
memory cache instead, if you browser (Netscape does, Microsoft not) has memory cache.
The size of the memory cache depends on the amount of free RAM, but 1000 K is
a good starting point even if your system only has 16Mb RAM. Disk cache
in Netscape (at least in 4.5) is still very bad, so do not use it (if you can).
- May I place SC into my archive of Internet/Java/Windows/... Tools?
- Yes go ahead, SC is open source software. Place it in any archive,
you can use my name/email for entry submission if you are not like to
use own.
- I have a 50MB cache in browser and do not want to loose its contents. May I still try SC?
- Yes, SC do not delete anything from it. Your browser will be
still able to use your old cached things. New things will be written to
Smart Cache (by itself) and also to your browser's cache (by browser).
- I want to use cache from my browser, but I want to use SC for clearing non cacheable headers and other advantages. What should I set up?
- Set nocaching * , generate_lastmod 2 (NOT FOR NETSCAPE! MSIE untested.), pragma_no_cache 1 , quick_abort 0 1 0
- What should I set to get even more caching?
- Set generate_lastmod 1 , pragma_no_cache 1 ,
remove_pragma_no_cache 1 , and first number in default_refresh_pattern to non-zero (avoids another Netscape stupid bug).
Using URL blocking, section 5.6 is good idea also. If you are only one SC user, set cache_password_protected 1
- Why SC uses deprecated Java APIs?
- Because there are much faster! There is no Unicode conversion stuff, which is not needed.
- Can I distribute SC on CD-ROM disk with other software? Need I a permission?
- No, you can distribute unmodified SC in any way you like
[10], you can
sell it, place it on your webpage, burn it on CD-ROMs, even with included
commercial programs. If you are ISP its OK to place it on your "startup" CDs
and its OK to run SC in business environments for making money. But if
you redistribute SC, you must redistribute GPL License also.
If you want to distributed a modified version of Smart Cache see GPL License
for some details.
- Can I use SC for business purposes?
- Yes, GPL allows to use it for ANY purpose.
- Can I share cached files by SC running under both Windows and Linux?
- Yes, SC used the same file format under both OSes. Many users do this,
just place cacheroot directory on FAT disk, seen by both.
- How can I run SC without opening a DOS window?
- In OS/2 you can run it invisibly via detach java -norestart -ms1m scache. I have no idea, how to made it under Windows, try asking some
Win-experts (some people tolds me that you may use javaw instead java).
I got a mail from man, who claims that he coded something for
running Smart Cache in systray, page is in Czech.
- After running -gc, with cache_size 100MB, the output of java scache -gc is: Cachesize is now 94361600 bytes. But treesize the cache-directory shows only 52MB. What's happen?
- You may have set incorrect block_size in
gc.cnf
or treesize program do not
report actual bytes used, but just sums of files length.
See Configuration of garbage collection, section 4.2
- Why is Microsoft Internet Explorer slower when using the cache instead faster?
- Someone told me, that sometimes when MSIE uses proxy cache, it makes
only one concurrent outgoing connection, which slows down it a lot.
Someone else tells me, that help disabling use HTTP/1.1 for proxy servers.
This do not apply to all versions of MSIE, just for some pre 4.0X versions.
- Smart Cache's hit/miss ratio is too low when compared with other proxy servers, but browsing is much faster with it!
- When using Smart Cache, WWW browser sends less requests than without
it. If you want to get comparable numbers with other proxy caches
set generate_lastmod 0 and you will see, how much "ratio" will be
increased. This of course do not made your browsing faster.
- How can I run Smart Cache as service under Windows NT?
- Since I do not have Windows NT anymore,
[11]
I can not help you. Someone
told me that small program exists, which can run any normal program as Windows
NT service. Try to look for this kind of software utility.
- How can I clearly deinstall Smart Cache?
- Just delete it and cached files. It do not writes anything to system directories, registers
or other strange places.
- Java runtime do not works after installation on Windows NT! I must reboot the machine for getting Java to work. After reboot everything works fine.
- This is probably a very common Windows NT (maybe 95/98/00 too?) problem.
This was reported by
many users. You must report this program to your Software or Operation System
Vendors.
- Is recommended to run caching DNS server for improving SC performance?
- SC do not needs it, Java itself caches all DNS responses, see Java DNS caching bug/feature, section 9.1.
- Is possible for Internet users to break into Smart Cache and get access to our local LAN?
- You can set BindAddress (Setting the bindaddress, section 6.8) to your local LAN IP address to prevent Internet
users from doing this. Using Fail *your.local.lan* works also. But
BindAddress is faster, safer and cleaner.
- What about to compile SC with javac -O ?
- Yes, this turns on inlining. I do not know if it javac really inlines
something, but why not to try it. I do not use that, because on my 486/33/16
it takes about 8 minutes. On K5/90/32 it takes just a few seconds.
- When Smart Cache uses If-Modified-Since ?
- Only if requested page has Last-Modified date.
- What about Expire: headers with dates like 1.1.1970?
- Smart Cache will use it as Pragma: no-cache.
If pragma_nocache is set to non-zero, expire will be ignored and
removed from server response.
- Jikes is faster java compiler, what about to compile SC with them?
- Jikes compiles faster, but faster is only execution of the compiler.
Jikes do not generate code which runs faster than code generated by javac.
Jikes can be downloaded from AlphaWorks IBM site for free. I think that source code for jikes is available
also. Jikes is written in C++.
- I have heard that there are some Java compilers, which are able to compile Java to native code, which runs faster. Will be such native versions distributed?
- I do not have access to such products. If you have, try it and
distribute native versions yourself.
- Is Smart Cache better than other Proxy servers? There are many of them.
- Yes there are, especially for Windows
[12]
some of them are mentioned in Other off line browsing solutions, section 1.4.
Try some of them and find it yourself. Better or worse are relative terms.
Use server which works the best for YOU.
- Will Smart Cache support JunkBusters-style block list?
- It needs full regexp implementation. Smart Cache currently does not
have it.
- Why Smart Cache is not supporting full regexp syntax?
- GNU Regexp Library for Java is bigger than 2/3 of Smart Cache's code.
Many people reports to me, that they are using JunkBusters proxy for ADV. blocking and smart cache for caching
and offline browsing.
- In
gc.cnf
for hpfs there is a suggested block size of 1024 for HPFS, but the sector size on HPFS is 512 byte and there is no sector-clustering (or with other words a cluster-size of 1) for HPFS. - HPFS really uses 512 bytes long file blocks, but every (even empty) file
uses also one sector (512 bytes) FNODE and directory entry (ignoring their size).
Summary: HPFS uses 512+blocks*512 per file. Because Smart Cache
can not handle this configuration, is better to use 1024 block_size.
- It is a shame, that this is written in Java...
- No. Many people use this software on Windows platform. I do not use
it and hardly will ever write software for running only on it. It was coded under OS/2, now I am coding that under Linux and use this on Windows, Mac, OS/2 and
Linux.
- Are not Java program so slow for normal usage?
- GUI Java applications are a quite slow. At least on my 486/33 you will
not have too much fun with it. But non-GUI Java programs (Windows based people often says console or DOS) are much faster than other interpreted languages
(such as Perl or Python). There are fast as many C programs. I have tested
wwwoffle proxy cache with my webbench utility and this show no difference
in speed on them on small cache sizes (10M) and Smart Cache has been much faster
on bigger (150M) cache.
- What about to rewrite it to C/C++ ?
- I will not do that, it is waste of my time. In fact Java
language is not so slow, some caches coded in
C are slower than this. If you need very FAST proxy,
get Squid instead.
Sources are available, you can rewrite it yourself
or pay someone to doing it for you. This is one of key benefits of Open Source
Software model.
[back]
[Abstract]
[Copyright Notice]
[Contents]
[next]
Smart Cache Manual
0.44
Radim Kolar hsn@cybermail.net