writeFuture function

Write to cache repository, using future::future