adding timeout argument to cache_put

Allow for setting timeouts manually.

Used in redis-cache.