Use sha1 digest instead of args in cache key

It also fixes inability to set custom key after recent updates.