Shortest hash in python to name cache files

后端 未结 8 657
春和景丽
春和景丽 2020-12-23 22:45

What is the shortest hash (in filename-usable form, like a hexdigest) available in python? My application wants to save cache files for some objects. The objects mu

8条回答
  •  清歌不尽
    2020-12-23 23:09

    Short hashes mean you may have same hash for two different files. Same may happen for big hashes too, but its way more rare. Maybe these file names should vary based on other references, like microtime (unless these files may be created too quickly).

提交回复
热议问题