Feature/set function

this implements a basic set function with ttl as optional parameter.