Bug fix memoize when using custom timeout

When using timeout argument in memoize, the cache_key generated did not expire using the same timeout, so if your timeout is different of the default the cache_key will be wrong. So if you memoize with a 3600 timeout, eache 300 (default time) the cache_key will expire and your memoized funcion will be useless, and the function will be called again.