Skip to content

Implementation of key hashing

Latest
Compare
Choose a tag to compare
@festinuz festinuz released this 24 Jul 15:58
· 2 commits to master since this release

This release addresses the issue of arbitrary big key lengths. From this point forward, keys will be hashed by default in the form described at the end of changelog.

Changelog:

  • Create utils.hash_key function.
  • Add _hash_key keyword argument to cached function. (resolves #7)
    • _hash_key defaults to True.
    • If _hash_key is set to True, keys generated from function calls are hashed and returned with fixed size of 65: first 32 symbols are md5 cache of function qualified name, symbol 33 is '_', and last 32 symbols are md5 cache of function arguments.