Renchunbing / memcache-client-forjava

Automatically exported from code.google.com/p/memcache-client-forjava
0 stars 0 forks source link

client.incr不能正常工作 #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 client.set(key,0);
 client.incr(key, 1);
此时应该返回 1,但是结果是一个很大的数 35634323

Original issue reported on code.google.com by Jun.T...@gmail.com on 21 Dec 2009 at 8:09

GoogleCodeExporter commented 9 years ago
set不是计数器的初始化方法,用storeCounter

Original comment by cenwen...@gmail.com on 10 Jan 2010 at 3:14

GoogleCodeExporter commented 9 years ago
如果set不能正确设置那么计数器,那么通过 
get(key)能得到计数器的值吗?

Original comment by Jun.T...@gmail.com on 10 Jan 2010 at 5:57

GoogleCodeExporter commented 9 years ago
刚才看了一下,有getCounter方法,但是我不明白的为啥对counter
要进行特别的函数来处理,我看了一
眼google的api,貌似没有特殊的方法。

http://code.google.com/intl/zh-
CN/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService
.html

如果能合并在 get/set中最好

Original comment by Jun.T...@gmail.com on 10 Jan 2010 at 6:00