Skip to content

Commit

Permalink
separate cache into folders by asset type
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarlevin committed Jan 22, 2025
1 parent 7db949b commit d0f64ac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pretext/project/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ def cache_asset_filename(
hash = hashlib.md5()
# hash the asset file
hash.update(asset_content)
# include the asset_type in hash
hash.update(asset_type.encode())
asset_hash = hash.hexdigest()
# create the cache file name
return cache_dir / f"{asset_hash}.{extension}"
return cache_dir / asset_type / f"{asset_hash}.{extension}"

0 comments on commit d0f64ac

Please sign in to comment.