def set_memcached(key, obj, lock=True):
 if lock:
  if create_lock(key):
   cache.set(key, cPickle.dumps(obj), 2592000)
   delete_lock(key)
 else:
  cache.set(key, cPickle.dumps(obj), 2592000)

def set_memcached ( key , obj , lock = True ) : if lock : if create_lock ( key ) : cache . set ( key , cPickle . dumps ( obj ) , 2592000 ) delete_lock ( key ) else : cache . set ( key , cPickle . dumps ( obj ) , 2592000 )
serialization object and add his in memcached .