WritePolicy writePolicy = new WritePolicy(); writePolicy.expiration = 10800;
The expiration field is defined in seconds. It defines the records Time To Live (TTL) after which the record will be treated as non-existent and the memory it occupies will soon be released back to the system.