Squid 2.6 Configuration Manual - Log File Path Names and Cache Directories
LOG FILE PATH NAMES AND CACHE DIRECTORIES
日志文件路径名称及缓存目录
Squid provides a number of logs that can be used when debugging problems, and when measuring the effectiveness and identifying users and the sites they visit. Because Squid can be used to "snoop" on users browsing habits, one should carefully consider privacy laws in your region and more importantly be considerate to your users. That's being said, logs can be very valuable tools in insuring that your users get the best service possible from your cache.
Squid提供大量的日志,在调试程序、评估效率、鉴别用户和他们所访问站点的时候都可以被用到。因为在用户的浏览习惯上,Squid可以被用做“窥探”,任何人都应该谨慎考虑隐私方面的法律法规在您所在的区域,并且最重要的是为您的客户做到深思熟虑。那即是说,日志在确保您的用户从您的缓存中获取得最好的服务时候,可以是非常具体价值的工具。
TAG NAME 标签名称 |
cache_dir |
---|---|
Description 描述 |
This is used to define cache directory, its path, type and size 用于定义缓存目录,它的路径、类型及大小 |
Build Option 编译选项 |
Default 默认 |
Usage 用法 |
cache_dir Type Directory-Name FS-specfic-data [options] |
Default 默认值 |
Synopsis
摘要
All objects which are to be cached are stored in the disk space defined by this tag. This defines the path to cache directory, cache directory name, type and size of the cache area.
要缓存的所有对象被存储在此标签所定义的磁盘空间中。定义了到缓存目录的路径、缓存名称、类型以及缓存区域的大小。
Arguments
参数
Type |
Type specifies the kind of storage system to use. Only "ufs" is built by default. To enable any of the other storage systems see the --enable-storeio configure option. Type is one of the following:
| ||||||||||
Directory-Name | Directory name is a top-level directory where cache swap files will be stored.If you want to use an entire disk for caching, then this can be the mount-point directory. The directory must exist and be writable by the Squid process. Squid will NOT create this directory for you. Directory name目录名称是一个顶层目录,缓存交换文件将被存放在此处。如果你需要使用整个磁盘来缓冲的话,那么它也可以是个挂载点目录。该目录必须存在而且Squid进程对其可写。Squid将不会为您创建此目录。 | ||||||||||
Mbytes | Mbytes is the amount of disk space (in MB) to use under this directory. The default is 100 MB. Change this to suit your configuration. Mbytes指的是用在此目录的所有磁盘空间的总和 | ||||||||||
Level1 |
Number of first-level subdirectories which will be created under the Directory. The default is 16. 将要在此目录下创建首层子目录的数量。默认值为16。 | ||||||||||
Level2 |
number of second-level subdirectories which will be created under each first-level directory. The default is 256. 将要在每个首层子目录下创建的第二层子目录数量。默认值为256。 | ||||||||||
Q1 |
number of unacknowledged I/O requests when Squid stops opening new files. If this many messages are in the queues, Squid won't open new files. Default is 64. 在Squid停止新文件的打开时,未响应的I/O请求数量。如果有大量信息在队列中,Squid装无法打开新文件。默认值为64。 | ||||||||||
Q2 |
number of unacknowledged messages when Squid starts blocking. If this many messages are in the queues, Squid blocks until it receives some replies. 在Squid开始阻塞时,未响应的信息数量。如果有大量信息在队列中,Squid将阻塞直到它收到某些回复信息。 |
Option:
选项:
read-only | Make the cache directory as read only. 使缓存目录只读。 |
max-size=n | refers to the max object size this storedir supports. It is used to initially choose the storedir to dump the object. 指定该存储目录支持的最大对象大小。常用于最开始时选择存储目录去转储对象。 |
Example(s)
实例
Cache_dir ufs /path/to/cache_dir 5000 16 256