When using memcache in GAE, I notice this weird behavior rarely. I set a value in memcache and when I try to retrieve the same value, I get None instead of the original value. The memcache value cannot have expired within such short span of time. I do ensure that True is returned when I set a value in memcache. What else can cause a memcache value to go missing? Is it a common system behavior?
Code Samples :
For setting the value
cache_set = memcache.set(matrix_name+'-'+str(m)+","+str(n),data[n],namespace=uuid)
while cache_set == False :
sleep(0.1)
logging.error(" Cache Set failed. Retrying for %s %s",matrix_name,str[m,n])
cache_set = memcache.set(matrix_name+'-'+str(m)+","+str(n),data[n],namespace=uuid)
For retrieving the value
memcache.get(matrix_name+'-'+str(m)+","+str(n),namespace=uuid)