Cache: hash long storage ids to ensure they fit in the database

For #1486