How does caching work?

Discussion room for Proxy Server package
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://account.synology.com/support/suppo ... p?lang=enu
2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
ismithers
Experienced
Experienced
Posts: 114
Joined: Mon Jun 03, 2013 9:56 am

How does caching work?

Postby ismithers » Sat Nov 15, 2014 3:24 pm

Hi all, I'm trying this package out as I liked the sound of the caching ability. I've got logging enabled and am viewing the logs in Log Center. I see nothing other than TCP_MISS followed by HIER_DIRECT meaning that no match could be found in the cache and that the file was retrieved from the server directly.

How is caching meant to work? I see no advantage to this working in it's current state, where everything is sourced directly from the original server and never served up by the proxy cache.
lcompston
Beginner
Beginner
Posts: 21
Joined: Sun Dec 23, 2012 3:17 pm

Re: How does caching work?

Postby lcompston » Tue Nov 25, 2014 11:51 am

Refer to this to get a much better view of the logs: http://forum.synology.com/enu/viewtopic.php?f=246&t=91804#p352461

Ignore the HIER_DIRECT comment, That refers to the proxy accessing the URL directly. At work we use that to find out if the proxy is retrieving URL's directly or utilising an upstream proxy server. So unless you require an upstream proxy its not relevant.

The TCP_MISS means the file is not currently cached. If you have just turned it on you will find thats the case

As you watch the logs, and access more and more of the same websites, you will see the TCP_MISS changing to other values - either TCP_HIT or TCP_MEM_HIT most likely - there are some refresh options that also occur. In those instances the content hasn't changed and is provided by the Proxy, rather than going out to the Internet. You need to test across multiple browsers / computers as most browsers will provide data from a local cache first, meaning its not even attempting to get the data from the proxy server's cache.

If you are testing from a single computer / browser, all the TCP_MISS's mean is content is coming down, but during the testing period of time, all cached content is coming from the local browser cache. Try clearing that out and see if the values change.
ismithers
Experienced
Experienced
Posts: 114
Joined: Mon Jun 03, 2013 9:56 am

Re: How does caching work?

Postby ismithers » Mon Dec 08, 2014 2:02 pm

Thanks for the response and information. I actually still haven't got even a single entry that is not a TCP_MISS. I've cleared my cache and had it running for about a fortnight without luck.
ismithers
Experienced
Experienced
Posts: 114
Joined: Mon Jun 03, 2013 9:56 am

Re: How does caching work?

Postby ismithers » Sun Jul 05, 2015 11:32 am

So coming back to this thread, still nothing other than TCP_MISS.

Has anyone actually gotten the caching working - the proxy is enabled, it just appears to not be doing anything.
ismithers
Experienced
Experienced
Posts: 114
Joined: Mon Jun 03, 2013 9:56 am

Re: How does caching work?

Postby ismithers » Mon Jul 06, 2015 3:09 am

Not sure if I cleared the cache incorrectly the first time when I posted a few months back, but it appears that it is working now and I am receiving some cache HITs which is good. Strange that, but at least I know that it is working.

Return to “Proxy Server”

Who is online

Users browsing this forum: No registered users and 1 guest