Article delegate-en/2377 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A2376@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Cache does not hit
18 Aug 2003 22:00:07 GMT feedback@delegate.org (Yutaka Sato)


On 08/18/03(21:23) you Torsten Schlabach <piueqbdyi-jfjnzgiynonr.ml@ml.delegate.org> wrote
in <_A2376@delegate-en.ML_>
 |I am trying to use DeleGate as pure FTP-FTP caching proxy. Therefore I start
 |it like this:
 |
 |delegated.exe -v -P21 SERVER=FTP DGROOT=c:\local\dgroot CACHE=do
 |CACHEDIR=ftpcache CONNECT=c,d
 |
 |(I tried this without DGROOT and CONNECT statement as well.)
 |
 |I can see the a file is put in the cache the first time I get it from a
 |client using the //server/pub/whatever syntax. But if the very same file is
 |requested a 2nd time, it does not come from the cache but is retrieved again
 |directly from the server.
 |
 |Any idea what might be wrong?

I could not reproduce the problem.  Could you show me the LOGFILE of your
DeleGate?  There might be a line which shows the reason why the cached file
is not reused.  A detailed LOGFILE of DeleGate with "-vd" option will be
more helpful.

By the way, I found another problem.  A cached file becomes invalid after
specified time period ("EXPIRE=1d", one day by default) and after the time,
the meta information of original file is checked if it was modified or not
after the cached time.  If it was modified, it will be reloaded form the
server.  But there was a bug in the algorithm to convert a string representing
modified time shown by the server (as 2003000000000X) to integer variable.
So it was reloaded every EXPIRE time.  This bug is fixed as enclosed patch,
and the current version is placed at
<URL:ftp://ftp.delegate.org/pub/DeleGate/dg8_6_3-snap03081906.zip>

Cheers,
Yutaka
--
  @ @ Yutaka Sato <y.sato@delegate.org> http://www.delegate.org/y.sato/
 ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


diff -cr dist/delegate8.6.3-snap03081808/rary/Strftime.c ./rary/Strftime.c
*** dist/delegate8.6.3-snap03081808/rary/Strftime.c	Wed Jul  9 03:16:49 2003
--- ./rary/Strftime.c	Tue Aug 19 05:30:00 2003
***************
*** 489,495 ****
  	if( vi != 7  )
  		return -1;
  	tm.tm_year = v2v[0]*100+v2v[1] - 1900;
! 	tm.tm_mon  = v2v[2];
  	tm.tm_mday = v2v[3];
  	tm.tm_hour = v2v[4];
  	tm.tm_min  = v2v[5];
--- 489,495 ----
  	if( vi != 7  )
  		return -1;
  	tm.tm_year = v2v[0]*100+v2v[1] - 1900;
! 	tm.tm_mon  = v2v[2] - 1;
  	tm.tm_mday = v2v[3];
  	tm.tm_hour = v2v[4];
  	tm.tm_min  = v2v[5];

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V