Implementing a Caching Proxy


CacheRoot /usr/local/apache/cache CacheSize 500000 CacheGcInterval 6 CacheMaxExpire 12


One of the advantages of a proxy is that it can cache the information that it serves. The next time that the same content is requested, the proxy can check whether it is already present in the cache and, if so, serve it directly from there. In Apache 1.3, the caching functionality is implemented as part of the mod_proxy module. These directives represent a sample configuration. CacheRoot allows you to specify the location of the cached files and CacheSize allows you to set the overall size in kilobytes of the cache. There are a number of other configuration directives that you can use to tweak the caching behavior. CacheGcInterval allows you to specify the frequency in hours that the cache will be periodically "purged" to comply with the CacheSize setting. CacheMaxExpire specifies the maximum amount of time a document can remain in the cache and still be considered valid without having to check with the original source.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net