The following code is working as expected. The value gets set in
memcache and expires after 10 seconds.

<cfset cache = createObject( "java",
"com.google.appengine.api.memcache.MemcacheServiceFactory").getMemcacheService()>
<cfset key="test">
<cfset value=now()>
<cfset expires = createObject( "java",
"com.google.appengine.api.memcache.Expiration").byDeltaSeconds(10)>
<cfset cache.put(key,value,expires)>
<cfset out = cache.get(key)>
<cfoutput>Value : #out#</cfoutput>

I would like to change the SetPolicy on the cache to
"ADD_ONLY_IF_NOT_PRESENT", but I am new to java and can't seem to
figure out the syntax to do this.

Any Suggestions?

Thanks,
Adam

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to