You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by kendo <63...@qq.com> on 2012/03/06 10:27:24 UTC
http proyx(big file can't be cached)
Hi:
I use the TS as the http the proxy server, large files can not be cached, for example, http download more than 10MB file or look an online video file.
I need to pay attention to what configuration, please?
thanks.
Part of the configuration file:
CONFIG proxy.config.http.cache.http INT 1
CONFIG proxy.config.http.cache.ignore_client_no_cache INT 1
CONFIG proxy.config.http.cache.ims_on_client_no_cache INT 1
CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1
CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 0
CONFIG proxy.config.http.cache.cache_responses_to_cookies INT 1
CONFIG proxy.config.http.cache.ignore_authentication INT 0
CONFIG proxy.config.http.cache.cache_urls_that_look_dynamic INT 1
CONFIG proxy.config.http.cache.enable_default_vary_headers INT 0
CONFIG proxy.config.http.cache.when_to_revalidate INT 0
CONFIONFIG proxy.config.http.cache.when_to_revalidate INT 0
CONFIG proxy.config.http.cache.required_headers INT 2
CONFIG proxy.config.http.cache.max_stale_age INT 604800
CONFIG proxy.config.http.cache.range.lookup INT 1
% show:cache
HTTP Caching --------------------------- on
Maximum HTTP Object Size ----------- NONE
Freshness
Verify Freshness By Checking --------- When The Object Has Expired
Minimum Information to be Cacheable -- An Explicit Lifetime
If Object has no Expiration Date:
Leave it in Cache for at least ----- 3600 s
but no more than ------------------- 86400 s
Variable Content
Cache Responses to URLs that contain
"?",";","cgi" or end in ".asp" ----- on
Alternates Enabled ------------------- off
Vary on HTTP Header Fields:
Text ------------------------------- NULL
Images ----------------------------- NULL
Other ------------------------------ NULL
Cache responses to requests containing cookies for:
All Content-types
% show:cache-stats
ERROR: Invalid parameter specified.
Check parameters for correct syntax and type.
Bytes Used --- 0 GB
Cache Size --- 4 GB
--RAM Cache--
Total Bytes -- 268435456
Bytes Used --- 3729408
Hits --------- 871
Misses ------- -1
--Lookups--
In Progress -- 0
Hits --------- 0
Misses ------- 0
--Reads--
In Progress -- 0
Hits --------- 1114
Misses ------- 3232
--Writes--
In Progress -- 4
Hits --------- 1925
Misses ------- 3
--Updates--
In Progress -- 0
Hits --------- 42
Misses ------- 0
--Removes--
In Progress -- 0
Hits --------- 0
Misses ------- 0
Re: http proyx(big file can't be cached)
Posted by Leif Hedstrom <zw...@apache.org>.
On 3/6/12 2:27 AM, kendo wrote:
> Hi:
>
>
> I use the TS as the http the proxy server, large files can not be cached, for example, http download more than 10MB file or look an online video file.
>
>
Well, you have
CONFIG proxy.config.cache.ram_cache_cutoff INT 4194304
However, that would still allow it to be cached. Make sure you have a disk
cache, and that it is sufficiently large. Secondly, make sure the requests
are not Range: requests, we don't cache partial objects.
Third, make sure the object is cacheable. You can control some behavior with
CONFIG proxy.config.http.cache.required_headers INT 2
(2 is the most conservative, requiring explicit Cache-Control or Expires
headers).
-- leif
-- Leif