fix cache_key when there is a short timestamp
add more specs around cache_key