Wingate 7 Cache Questions

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Wingate 7 Cache Questions

Postby JackD » May 12 12 7:13 am

Hi,

I've been a user of Wingate 6 for several years. I just upgraded to Wingate 7 a few weeks ago. So far everything has been working well, but I have a question about using the HTTP Cache.

I've been playing around with various settings for the cache. I installed SQL Server 2005 Express and I'm using that for the database. A few days ago I created a policy to only cache certain file types and sites, that seems to be reducing the amount of items stored in cache, which is what I expected. I'm wondering if there is a way to cache only files that are larger than a specified size? What seems to be happening, as the cache builds up, browsing gets slower as Wingate queries the SQL server for the cache index. As the index gets larger, the queries take longer and I can see the CPU usage trend higher and higer. My thoughts are that although cache seems like a great idea, it may actually be quicker to just download the files again if they're small files.

Regards,
Jack
JackD
 
Posts: 6
Joined: May 12 12 7:04 am

Re: Wingate 7 Cache Questions

Postby adrien » May 14 12 5:12 pm

Hi Jack

WinGate doesn't currently have the ability to switch based on file size, however for many small files returned, you will receive a Content-Length header which indicates the size. In the ProxyResponse event.

You should be able to compare this to a number, and if it's smaller than your threshold, turn off adding it to the cache.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Wingate 7 Cache Questions

Postby JackD » May 15 12 12:37 am

Hi Adrien,

I'll try playing around with the content-length header. Friday I wrote a little program that looks at the wingate cache index and deletes any files smaller than my threshold, and also deletes the entry in the database. I'll see how this works today when more users are on.

Jack
JackD
 
Posts: 6
Joined: May 12 12 7:04 am

Re: Wingate 7 Cache Questions

Postby adrien » May 15 12 11:17 am

Hi Jack

I wouldn't recommend deleting records from the DB, however you can flag it for cleanup by setting entry_status to 2. That will cause WinGate to delete the file as well, and update counters / volume sizes properly etc.

Otherwise you'll have problems with volume sizes.

You can even get WinGate to do the query, using a scheduled event going to an SQL statement such as

update cache_index set entry_status = 2 where disk_use < 10240

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Wingate 7 Cache Questions

Postby JackD » May 16 12 12:46 am

Hi Adrien,
I stopped updating the database and am now using a policy to control what gets cached. It seems to be working well so far. Thank you for pointing me in the right direction!
Jack
JackD
 
Posts: 6
Joined: May 12 12 7:04 am


Return to WinGate

Who is online

Users browsing this forum: No registered users and 2 guests