trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Payne <jp557...@gmail.com>
Subject Re: How can I set partial value of a query parameter into cache key?
Date Mon, 25 Jun 2018 23:13:25 GMT
i dont know if there is a cache url lua script already written.. but
if not, just follow examples in the below to write your own.

https://docs.trafficserver.apache.org/en/7.1.x/admin-guide/plugins/ts_lua.en.html

On Mon, Jun 25, 2018 at 6:02 PM, Chillin Gong <gongchunlin@gmail.com> wrote:
> Hi Jeremy,
>
> Thanks for the reply! Do you mean there are some lua scripts that implement
> the cache key feature, and they can be hooked into traffic server with lua
> plugin? Do you have a sample lua script for it?
>
>
> Regards,
> Chunlin
>
> On Mon, Jun 25, 2018 at 3:56 PM, Jeremy Payne <jp557198@gmail.com> wrote:
>>
>> If you're open, you'll find what you're looking for in the lua plugin.
>>
>>
>>
>> On Mon, Jun 25, 2018 at 12:02 PM, Chillin Gong <gongchunlin@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I am a new user of traffic server. Recently I am trying to migrate a
>> > product
>> > from ATS5 to latest ATS7. In ATS5, we use the cache feature, and use the
>> > cacheurl plugin and regular expressions to extract partial value of a
>> > query
>> > parameter to comprise the cache key. However, I didn't find
>> > corresponding
>> > feature in ATS7 cachekey plugin to get partial value of a query
>> > parameter.
>> >
>> > For example, our request url is something like
>> > "/my/path?kw=test&geo=<country>,<state>,<city>,<street>".
In ATS5, we
>> > can
>> > get "geo=<country>,<state>,<city>" (without <street>)
as our cache key.
>> > However, I didn't find similar syntax to get such partial value with
>> > cachekey plugin in ATS7.
>> >
>> > https://docs.trafficserver.apache.org/en/7.0.x/admin-guide/plugins/cachekey.en.html
>> >
>> > Does anyone know how I can achieve similar feature with cachekey plugin
>> > or
>> > other plugins?
>> >
>> >
>> > Thanks,
>> > Chunlin Gong
>> >
>> >
>
>

Mime
View raw message