Hello, We didn't find any reason which could explain this problem of collision. Finally we revert to the old 1.3.2 java client with our custom cfc.
On 20 avr, 17:54, john <[email protected]> wrote: > Thanks for your answer. > > Before we use the Greg Whalin 1.3.2 java client. > > In Application.cfc with OnApplicationStart : > > <cfset loc.i = 0 /> > <cfloop list="#application.stConfig.MEMCACHEDSERVERLIST#" > index="loc.elmt"> > <cfset loc.server[loc.i+1] = loc.elmt & ":11211" /> > <cfset loc.i = loc.i + 1 /> > </cfloop> > > <cfset CacheCreate( "cachestore", "memcached",loc.server) /> > > Then we have a cfc with methods (we have keep the old method we use > with the 1.3 api client) > > getCache : > > <cfset obj = CacheGet("cachestore",arguments.key,arguments.groups) /> > > putInCache > > <cfset > CacheSet(cachename="cachestore",cachekey=arguments.key,cachegroup=arguments > .groups,data=arguments.value) / > > > > flush > <cfset CacheDelete (cachename="cachestore",cachekey=Hash("home.html" & > arguments.groups),cachegroup=arguments.groups) /> > <cfset CacheDelete (cachename="cachestore",cachekey=Hash("homequery" & > arguments.groups),cachegroup=arguments.groups) /> > <cfset CacheDelete > (cachename="cachestore",cachekey=Hash("archive.html" & > arguments.groups),cachegroup=arguments.groups) /> > <cfset CacheDelete > (cachename="cachestore",cachekey=Hash("archiveindex.html" & > arguments.groups),cachegroup=arguments.groups) /> > > We call this cfc like this : > > Get : > > <cfset cachedStruct = request.cbcache.getCache(Hash(variables.pageType > & variables.blog.blogURL & > variables.blog.blogDomainId),variables.blog.blogURL & > variables.blog.blogDomainId) /> > > First arg is the key (a hash) and second arg the group. > > Put : > > <cfset request.cbcache.putInCache(Hash(variables.pageType & > variables.blog.BlogURL & > variables.blog.blogDomainId),tmpStruct,variables.blog.blogURL & > variables.blog.blogDomainId) /> > > Thanks for your help ! > > Regards. > > On 20 avr, 23:23, "Peter J. Farrell" <[email protected]> wrote: > > > > > > > > > john said the following on 04/20/2011 04:00 PM:> Hi, > > > > What is the limit for the key lengh in CacheGet and CacheSet > > > functions ? We use an hash of variable, but it seems that we have some > > > collisions between data.. > > > Before moving to a 'pure OpenBD memcached logic' we had a custom cfc > > > which works well with java client in the 1.3 version > > > Thanks. > > > John, > > > * Could you share your configuration for your memcache cache (i.e. how > > you create your memcache cache using cacheCreate()...)? > > * Also, could you share an example of your cacheSet/Get()? A stripped > > down version is fine. > > > I looked over the OpenBD source and I don't see any limitations in the > > OpenBD source. Behind the scenes, we're using the com.danga library for > > MemCache. What Java library were you using before? > > > The only possibility I could see is that the key you supply is combined > > with the cache domain to create a safe key -- then a checksum is created > > and an integer of that checksum is return. The only thing I can think > > of -- which Alan or Andy will be better to answer -- is that there is a > > collision occurring here. > > > * What length of keys are you supplying? Are they completely unique or > > are they pseudo random generated off of that variable? > > > .Peter > > > -- > > Peter J. Farrell > > [email protected] > > [email protected]http://blog.maestropublishing.com > > Identi.ca / Twitter: @maestrofjp -- official tag/function reference: http://openbd.org/manual/ mailing list - http://groups.google.com/group/openbd?hl=en
