Closed GoogleCodeExporter closed 9 years ago
The current code is correct, please see the javadoc for the Whalin client...
http://tinyvh.com/Pz
The Date(long) constructor that you are using attempts to initialize a Date
object to
the number of seconds past epoch. Which means that if cacheTimeSeconds equals
5, your
code would create a Date object for 5 seconds past midnight Jan 1 1970.
The current code, though verbose because it uses the Calendar API, is correct.
It
creates a Calendar initialized to now (no-arg Date is now). Then it dials the
calendar forward by cacheTimeSeconds (now + 5 seconds for example). It then
gets out
a date (getTime() returns a Date) and sets that as the expiration time for the
object.
Original comment by raykrue...@gmail.com
on 5 Jun 2009 at 2:12
but has you test on DangaMemcache?
I have tested it.
I'am report it because i found a error on this code.
I'am using memcached 1.2.0
Original comment by zheng...@gmail.com
on 8 Jun 2009 at 1:48
DangaMemcache is the Whalin client. Please look over the javadoc for that
client as I
mentioned.
Original comment by raykrue...@gmail.com
on 8 Jun 2009 at 10:53
but the javadoc is error
i have read the DangeMemcache's source
may be you can read it some time
thanks
and this discuses was all over now.
Original comment by zheng...@gmail.com
on 10 Jun 2009 at 2:36
Original issue reported on code.google.com by
zheng...@gmail.com
on 5 Jun 2009 at 2:28