Use integer time to generate cache IDs, applies to #1102

This improves the possibility of encountering a race condition as found in #1102.

What are thoughts around using a less-human-readable folder name for the cache ID?

/cc @bittersweet @thiagofm