Re: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread Miles Libbey
(And there are close examples on that page:
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html#check-for-existence-of-a-header
and
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html#add-cache-control-headers-based-on-origin-path

On Mon, Apr 22, 2024 at 7:49 AM dave seddon 
wrote:

> I guess you could rewrite the headers
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html
>
> On Mon, Apr 22, 2024 at 7:31 AM Pavel Vazharov  wrote:
>
>> Thank you for the response.
>>
>> Unfortunately we don't have control over the upstream http servers in
>> this case.
>> We need to make sure that we don't cache particular objects while working
>> as a forward proxy.
>> I think, I can write a C++ plugin for this. I was just trying to find if
>> there is a ready solution before writing our own.
>>
>> On Mon, Apr 22, 2024 at 5:26 PM dave seddon 
>> wrote:
>>
>>> The "cleanest" way is for the upstream http server to add cache control
>>> headers
>>>
>>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
>>>
>>> On Mon, Apr 22, 2024, 07:22 Pavel Vazharov  wrote:
>>>
 Hi there,

 Is there existing ATS functionality or plugin through which can be
 disabled caching of particular objects by URL or regex?

 Thanks,
 Pavel.

>>>
>
> --
> Regards,
> Dave Seddon
> +1 415 857 5102
>


Re: Notification when objects are removed from the cache (disk storage)

2024-04-22 Thread Pavel Vazharov
I see. Thank you.

On Mon, Apr 22, 2024 at 6:32 PM Leif Hedstrom  wrote:

> There isn’t. However, you can see how often the disks are churned (via
> metrics), which at least gives you an estimate of how long objects are
> staying in the cache. If the disks wraps once a week, objects are likely to
> stay in the cache for a week.
>
> — Leif
>
> > On Apr 22, 2024, at 07:00, Pavel Vazharov  wrote:
> >
> > 
> > Hi there,
> >
> > Is there a way to write a plugin which can receive notifications when
> objects are removed from the cache (disk storage) during the moves of the
> "write head"?
> > I'm asking this because we have a need to track the lifetime of the
> objects in the disk storage and "know" when a given object is no longer
> available in the disk cache.
> >
> > Regards,
> > Pavel.
>


Re: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread Pavel Vazharov
On Mon, Apr 22, 2024 at 6:26 PM Nuno Vargas  wrote:

> Hi,
>
>
>
> You can use cache.config:
>
> url_regex=something action=never-cache
>
>
>
>
> https://docs.trafficserver.apache.org/admin-guide/files/cache.config.en.html
>
Thank you. Will look into it.

>
> Regards,
>
> Nuno V.
>
>
>
> *From:* dave seddon 
> *Sent:* 22 de abril de 2024 15:46
> *To:* users@trafficserver.apache.org
> *Subject:* Re: Is there ready functionality for disabling caching of
> particular objects
>
>
>
>
> *CAUTION:* This email was originated from outside NOS organization. Do
> not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
>
>
> I guess you could rewrite the headers
>
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html
>
>
>
> On Mon, Apr 22, 2024 at 7:31 AM Pavel Vazharov  wrote:
>
> Thank you for the response.
>
> Unfortunately we don't have control over the upstream http servers in this
> case.
>
> We need to make sure that we don't cache particular objects while working
> as a forward proxy.
>
> I think, I can write a C++ plugin for this. I was just trying to find if
> there is a ready solution before writing our own.
>
>
>
> On Mon, Apr 22, 2024 at 5:26 PM dave seddon 
> wrote:
>
> The "cleanest" way is for the upstream http server to add cache control
> headers
>
>
>
> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
>
>
>
> On Mon, Apr 22, 2024, 07:22 Pavel Vazharov  wrote:
>
> Hi there,
>
> Is there existing ATS functionality or plugin through which can be
> disabled caching of particular objects by URL or regex?
>
> Thanks,
>
> Pavel.
>
>
>
> --
>
> Regards,
>
> Dave Seddon
> +1 415 857 5102
>


Re: Notification when objects are removed from the cache (disk storage)

2024-04-22 Thread Leif Hedstrom
There isn’t. However, you can see how often the disks are churned (via 
metrics), which at least gives you an estimate of how long objects are staying 
in the cache. If the disks wraps once a week, objects are likely to stay in the 
cache for a week.

— Leif 

> On Apr 22, 2024, at 07:00, Pavel Vazharov  wrote:
> 
> 
> Hi there,
> 
> Is there a way to write a plugin which can receive notifications when objects 
> are removed from the cache (disk storage) during the moves of the "write 
> head"?
> I'm asking this because we have a need to track the lifetime of the objects 
> in the disk storage and "know" when a given object is no longer available in 
> the disk cache.
> 
> Regards,
> Pavel.


RE: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread Nuno Vargas
Hi,

You can use cache.config:
url_regex=something action=never-cache

https://docs.trafficserver.apache.org/admin-guide/files/cache.config.en.html

Regards,
Nuno V.

From: dave seddon 
Sent: 22 de abril de 2024 15:46
To: users@trafficserver.apache.org
Subject: Re: Is there ready functionality for disabling caching of particular 
objects


CAUTION: This email was originated from outside NOS organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

I guess you could rewrite the headers
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html

On Mon, Apr 22, 2024 at 7:31 AM Pavel Vazharov 
mailto:pa...@x3me.net>> wrote:
Thank you for the response.
Unfortunately we don't have control over the upstream http servers in this case.
We need to make sure that we don't cache particular objects while working as a 
forward proxy.
I think, I can write a C++ plugin for this. I was just trying to find if there 
is a ready solution before writing our own.

On Mon, Apr 22, 2024 at 5:26 PM dave seddon 
mailto:dave.seddon...@gmail.com>> wrote:
The "cleanest" way is for the upstream http server to add cache control headers

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

On Mon, Apr 22, 2024, 07:22 Pavel Vazharov 
mailto:pa...@x3me.net>> wrote:
Hi there,
Is there existing ATS functionality or plugin through which can be disabled 
caching of particular objects by URL or regex?
Thanks,
Pavel.


--
Regards,
Dave Seddon
+1 415 857 5102


Re: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread Pavel Vazharov
Yes, this seems like an option. I need to think more about it. Thank you
for the idea.

On Mon, Apr 22, 2024 at 5:50 PM dave seddon 
wrote:

> I guess you could rewrite the headers
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html
>
> On Mon, Apr 22, 2024 at 7:31 AM Pavel Vazharov  wrote:
>
>> Thank you for the response.
>>
>> Unfortunately we don't have control over the upstream http servers in
>> this case.
>> We need to make sure that we don't cache particular objects while working
>> as a forward proxy.
>> I think, I can write a C++ plugin for this. I was just trying to find if
>> there is a ready solution before writing our own.
>>
>> On Mon, Apr 22, 2024 at 5:26 PM dave seddon 
>> wrote:
>>
>>> The "cleanest" way is for the upstream http server to add cache control
>>> headers
>>>
>>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
>>>
>>> On Mon, Apr 22, 2024, 07:22 Pavel Vazharov  wrote:
>>>
 Hi there,

 Is there existing ATS functionality or plugin through which can be
 disabled caching of particular objects by URL or regex?

 Thanks,
 Pavel.

>>>
>
> --
> Regards,
> Dave Seddon
> +1 415 857 5102
>


Re: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread dave seddon
I guess you could rewrite the headers
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/header_rewrite.en.html

On Mon, Apr 22, 2024 at 7:31 AM Pavel Vazharov  wrote:

> Thank you for the response.
>
> Unfortunately we don't have control over the upstream http servers in this
> case.
> We need to make sure that we don't cache particular objects while working
> as a forward proxy.
> I think, I can write a C++ plugin for this. I was just trying to find if
> there is a ready solution before writing our own.
>
> On Mon, Apr 22, 2024 at 5:26 PM dave seddon 
> wrote:
>
>> The "cleanest" way is for the upstream http server to add cache control
>> headers
>>
>> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
>>
>> On Mon, Apr 22, 2024, 07:22 Pavel Vazharov  wrote:
>>
>>> Hi there,
>>>
>>> Is there existing ATS functionality or plugin through which can be
>>> disabled caching of particular objects by URL or regex?
>>>
>>> Thanks,
>>> Pavel.
>>>
>>

-- 
Regards,
Dave Seddon
+1 415 857 5102


Re: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread Pavel Vazharov
Thank you for the response.

Unfortunately we don't have control over the upstream http servers in this
case.
We need to make sure that we don't cache particular objects while working
as a forward proxy.
I think, I can write a C++ plugin for this. I was just trying to find if
there is a ready solution before writing our own.

On Mon, Apr 22, 2024 at 5:26 PM dave seddon 
wrote:

> The "cleanest" way is for the upstream http server to add cache control
> headers
>
> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
>
> On Mon, Apr 22, 2024, 07:22 Pavel Vazharov  wrote:
>
>> Hi there,
>>
>> Is there existing ATS functionality or plugin through which can be
>> disabled caching of particular objects by URL or regex?
>>
>> Thanks,
>> Pavel.
>>
>


Re: Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread dave seddon
The "cleanest" way is for the upstream http server to add cache control
headers

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

On Mon, Apr 22, 2024, 07:22 Pavel Vazharov  wrote:

> Hi there,
>
> Is there existing ATS functionality or plugin through which can be
> disabled caching of particular objects by URL or regex?
>
> Thanks,
> Pavel.
>


Is there ready functionality for disabling caching of particular objects

2024-04-22 Thread Pavel Vazharov
Hi there,

Is there existing ATS functionality or plugin through which can be disabled
caching of particular objects by URL or regex?

Thanks,
Pavel.


Notification when objects are removed from the cache (disk storage)

2024-04-22 Thread Pavel Vazharov
Hi there,

Is there a way to write a plugin which can receive notifications when
objects are removed from the cache (disk storage) during the moves of the
"write head"?
I'm asking this because we have a need to track the lifetime of the objects
in the disk storage and "know" when a given object is no longer available
in the disk cache.

Regards,
Pavel.