home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 April
/
PCWorld_2001-04_cd.bin
/
Software
/
TemaCD
/
smartcache
/
samples
/
gc.cnf
< prev
next >
Wrap
Text File
|
2001-01-26
|
5KB
|
129 lines
#Smart Cache Garbage collection configuration file
#
#WARNING:
# garbage collection is NOT started when specified cache size is reached
# you must run it by hand -> java scache -gc
#cache size in MEGABYTES. Bigger is better, but running GC on bigger cache
# takes more time.
cache_size 50
#size of one allocation unit (also known as cluster or block)
# OS/2 with HPFS filesystem - 1024 bytes
# Linux with ext2fs filesystem - 1024 bytes
# FAT/VFAT Filesystem - run chkdsk/scandisk
#This is needed for computing the real diskspace used, not just a sum of
#individual file's size, which is smaller.
block_size 1024
#average directory_size in bytes. Average directory size (includes directory
#overhead AND size of .cacheinfo file). On Win32 FAT/VFAT filesystems
#set it to block_size*2 (I'm not sure about value for new FAT32 filesystems)
average_directory_size 5120
# TAG: cache_low_mark (percent, 0-100)
# TAG: cache_high_mark (percent, 0-100)
# The low- and high-water marks for cache LRU replacement.
# LRU replacement begins when the high-water mark is reached
# and ends when enough objects have been removed and the low-water
# mark is reached.
#
# Defaults are 90% and 95% and there is no
# need to change it.
#
cache_low_mark 90
cache_high_mark 95
#remove all objects bigger than XX kB
maximum_object_size 4096
#size of memory array for holding temporary objects during garbage collection
gcarraysize 1400
# TAG: reference_age
# As a part of garbage collection Cache performs Least Recently
# Used removal of cached objects. The LRU age for removal is
# computed dynamically, based on the amount of disk space in
# use. The 'reference_age' value defines the maximum LRU age.
# For example, setting reference_age to 7 will cause
# objects to be removed if they have not been accessed for a week
# or more. If set to 99999 LRU removal is disabled, and objects
# will be removed only when disk usage is over the high water
# mark. The default value is one year.
#
# Specify a number of days here. For example:
# reference_age 365
#
reference_age 365
# GC is LRU based. Smart Cache doesn't make difference if object
# is accessed off-line or on-line.
#
# Following commands will help you to fine tune GC
#
# Possible LRU modifications.
# Note: There is -NO SPACE- between number and operator.
#
# +20 .. make object 20 days older
# -20 .. make object 20 days younger
# *2.0 .. make object 2 times older
# /2.0 .. make object 2 times younger
# =2 .. if object is 2 or more days old, delete it immediately (even if cache size is good)
#Penalty for negative cached objects (HTTP RC>=400)
#there are errors messages (not found, forbidden and so on..)
negative_cached_penalty *10
#large_object_penalty XXXX YYY ZZZZ QQQ
# - if cached object is bigger than XXXX bytes make YYY and make QQQ for every
# ZZZZ bytes over XXXX. Only one sizegt line is allowed. Default is nothing.
#
large_object_penalty 200000 *2.5 50000 +2
#small_object_penalty XXXX YYY
# if cached object is smaller than XXXX bytes, make YYY.
# Some people wants to expire small objects faster.
small_object_penalty 1200 *1.3
#if objects has expired date and now are expired. If undefined -
#expired objects are always removed from cache.
expired_penalty *4
#If objects are expired, but can be checked with If-Modified-Since request
# (some stupid servers generates expire info just for their fun because
# wants more hits.)
expired_but_checkable_penalty *2
#if object can not be checked with If-Modified-Since request
#HINT: if you don't plan ever use this cache for off-line browsing use some
#big value (i.e. *20) so uncheckable object will be early deleted
not_checkable_penalty *3
#URL masks. Order is important; First matching mask stops the urlmasks
# processing.
case_sensitive_matching 1
# Are URL tests case sensitive?
# 1 - yes, 0 - no.
#
# Hostnames are always converted to lowercase and because
# in this example we use expire by hostnames - turning on case sensitive match
# will speed up the GC. You can of course turn on this case sensitive check
# for some URLs (see example)
#expire CGI's output somewhat faster
urlmask *?* *2
case_sensitive_matching 0
urlmask *cgi* *2
case_sensitive_matching 1
#Expire Sun's Java site 2 times slower
#urlmask *java.sun* /2
#and Javaworld 5 times slower than other sites
#urlmask http://www.javaworld.com/* /5
#remove cached files received by FTP protocol after 7 days
#urlmask ftp://* =7