Return-Path: Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: (qmail 21706 invoked from network); 21 Mar 2011 17:47:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Mar 2011 17:47:05 -0000 Received: (qmail 8399 invoked by uid 500); 21 Mar 2011 17:47:04 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 8354 invoked by uid 500); 21 Mar 2011 17:47:04 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 8346 invoked by uid 99); 21 Mar 2011 17:47:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 17:47:04 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [71.6.165.248] (HELO kramer.ogre.com) (71.6.165.248) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 17:46:57 +0000 Received: from loki.ogre.com (24-52-35-136.us.warpdriveonline.com [24.52.35.136]) (authenticated bits=0) by kramer.ogre.com (8.14.4/8.14.4) with ESMTP id p2LHkY7c012513 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Mon, 21 Mar 2011 10:46:34 -0700 X-DKIM: Sendmail DKIM Filter v2.8.3 kramer.ogre.com p2LHkY7c012513 Message-ID: <4D878EF9.7010601@apache.org> Date: Mon, 21 Mar 2011 11:46:33 -0600 From: Leif Hedstrom User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: users@trafficserver.apache.org CC: Conan Subject: Re: how to cache object with different urls (with question mark) just once? References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------060408030305030009080602" This is a multi-part message in MIME format. --------------060408030305030009080602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 03/21/2011 11:13 AM, Conan wrote: > hi users, > > I have a object to cache. This object's url is like > "http://example.com/a.jpg?id=xxx". The parameters after question > mark(?) is different and dynamic, but the object is identical so it's > better to cache only one copy of the object. > > What I except is: ATS ignore the parameters in url and serve the > object (if cached), or pass the complete url to original server if the > object is not cached. > > > When I enable "proxy.config.http.cache_urls_that_look_dynamic", it > seemed ATS treated these urls as different objects. If I disable it, > ATS did not cache any urls with question mark. > > Any suggestions? Or what kind of plugin could I write to support that? > You'd have to write a plugin that calculates a different cache key, based on your "normalization" rules. In your case, presumably only the host and the path. -- Leif --------------060408030305030009080602 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/21/2011 11:13 AM, Conan wrote:
hi users,
    
I have a object to cache. This object's url is like "http://example.com/a.jpg?id=xxx". The parameters after question mark(?) is different and dynamic, but the object is identical so it's better to cache only one copy of the object. 

What I except is: ATS ignore the parameters in url and serve the object (if cached), or pass the complete url to original server if the object is not cached.

When I enable "proxy.config.http.cache_urls_that_look_dynamic", it seemed ATS treated these urls as different objects. If I disable it, ATS did not cache any urls with question mark.

Any suggestions? Or what kind of plugin could I write to support that?


You'd have to write a plugin that calculates a different cache key, based on your "normalization" rules. In your case, presumably only the host and the path.

-- Leif

--------------060408030305030009080602--