Mod disk_cache permanent caching images and disabling reacurring header updates
Posted
by
user135532
on Server Fault
See other posts from Server Fault
or by user135532
Published on 2012-09-11T15:25:26Z
Indexed on
2012/09/11
15:39 UTC
Read the original article
Hit count: 403
I am trying to get mod disk_cache to permantly cache images retrieved from an image server on the webserver using ProxyPass.
While the image is being retrieved correctly from the server and is served from the cache on further requests, then I am still having the webserver call the image server and causing the cached header to be updated. Because of load concerns then I need to never call the image server on a specific url again after it has been cached once, or extend the refresh time for as long as possible.
The webserver is IHS 7.0 The mod's are mod_disk_cache.so, mod_cache.so, mod_proxy.so Version 2.2.8.0
Following is from my httpd.conf:
ProxyPass /webserver/media/images/ http://imageserver.com/ws/media/images/
# Caching pictures
<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheDefaultExpire 2628000
#CacheDisable
CacheEnable disk /webserver/media/images/
CacheIgnoreCacheControl On
CacheIgnoreHeaders Cookie Referer User-Agent X-Forwarded-For X-Forwarded-Host X-Forwarded-Server Accept-Language Accept Host
CacheIgnoreNoLastMod On
CacheIgnoreQueryString Off
#CacheIgnoreURLSessionIdentifiers
CacheLastModifiedFactor 10000000.1
#CacheLock on
#CacheLockMaxAge 5
#CacheLockPath
CacheMaxExpire 1576800
CacheStoreNoStore On
CacheStorePrivate On
CacheDirLength 2
CacheDirLevels 3
CacheMaxFileSize 1000000
CacheMinFileSize 1
CacheRoot c:/cacheroot2
</IfModule>
</IfModule>
© Server Fault or respective owner