#1 2024-12-17 12:47:12

Kabiri
Member
Registered: 2024-06-22
Posts: 42

How can I disable server-side caching in THttpProxyServer ?

I've created a file server using THttpProxyServer.
When I first request the content of a URL-related folder, the correct response is returned. However, subsequent requests show the previous file list, even if the folder content has changed.
I suspect this is due to caching. I haven't found a way to disable it.

Offline

#2 2024-12-17 13:34:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,742
Website

Re: How can I disable server-side caching in THttpProxyServer ?

You can set the psoDisableFolderHtmlIndexCache option for instance to disable this whole cache of folder list.

Otherwise you can tune the THttpProxyServerSettings.MemCache.TimeoutSec value which is 15 minutes by default.

Offline

#3 2024-12-17 13:54:46

Kabiri
Member
Registered: 2024-06-22
Posts: 42

Re: How can I disable server-side caching in THttpProxyServer ?

Thanks
When I download the content of a file, and then if the file's content changes, and I download the same file again, the file's content is still the old one. I have a file whose content is constantly changing. It would be great if I could tell the THttpProxyServer not to cache that file.

Offline

#4 2024-12-17 14:18:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,742
Website

Re: How can I disable server-side caching in THttpProxyServer ?

You have the IgnoreCsv setting for this.

Offline

#5 2024-12-17 14:59:39

Kabiri
Member
Registered: 2024-06-22
Posts: 42

Re: How can I disable server-side caching in THttpProxyServer ?

Thanks
I used it like this: settings.MemCache.IgnoreCsv:='*.ls';
I don't think it works with filtering.

Offline

#6 2024-12-17 19:55:05

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,742
Website

Re: How can I disable server-side caching in THttpProxyServer ?

I don't understand what "I don't think it works with filtering" means.

Try to make the minimum debugging and report here some context.

Offline

#7 2024-12-18 09:20:12

Kabiri
Member
Registered: 2024-06-22
Posts: 42

Re: How can I disable server-side caching in THttpProxyServer ?

I apologize for my poor English.
I meant to set a filter (*.ls for all files with the .ls extension) for the IgnoreCsv value, but I think this property doesn't accept filters.(Because it didn't work)

Last edited by Kabiri (2024-12-18 09:21:51)

Offline

#8 2024-12-18 13:18:22

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,742
Website

Re: How can I disable server-side caching in THttpProxyServer ?

I tried to reproduce the issue with no success:
https://github.com/synopse/mORMot2/commit/50097c2e

Please debug a little on your side and see what may be wrong.
Not only saying "it didn't work".

Offline

Board footer

Powered by FluxBB