More efficient sha1.
typo
Avoid to reopen the cache more than necessary