use md5 (faster) and avoid locking to check cache
put back in lock
Merge pull request #17 from inorton/master

use md5 for hashing