trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chou, Peter" <pbc...@labs.att.com>
Subject RE: Write Lock
Date Thu, 25 Jan 2018 17:41:49 GMT
Aaron,

Thanks for the response. Jeremy and I were looking for a way to cache an object that would
have been blocked by the cache_promote plugin (which uses the API function you show below).
We are considering adding an over-ride into this plugin, e.g., special ATS internal header,
that could be set by other plugins to  allow an object to be cached earlier than the normal
cache_promote policy. This would probably be better than messing around with the write-lock.
Appreciate any thoughts.

Thanks,
Peter


From: Aaron Canary [mailto:acanary@oath.com]
Sent: Thursday, January 25, 2018 6:56 AM
To: users@trafficserver.apache.org
Subject: Re: Write Lock

This is how I disable writing to cache from a plugin. I'm not sure that is exactly what you
are asking for.
I've used it as late as TS_HTTP_READ_RESPONSE_HDR_HOOK. But it will also work in a TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK.

    // do NOT write to cache
    TSHttpTxnServerRespNoStoreSet(txnp, 1);

On Wed, Jan 24, 2018 at 3:18 PM, Jeremy Payne <jp557198@gmail.com<mailto:jp557198@gmail.com>>
wrote:
Is there an over-rideable configuration or maybe an API function I can
use to disable write locks for
a given cache-key/txn ?

Basically after the cache lookup is complete, I want to parse request
headers and if header values match a certain string/condition, I want
to disable the
write lock.  I'm OK if this disables caching for the transaction.


Jeremy



--
Aaron Canary
ATS - Senior Software Engineer
Mime
View raw message