swarrot / SwarrotBundle

A symfony bundle for swarrot integration
MIT License
89 stars 59 forks source link

Use hash for definition ID generation instead of uniqid #199

Closed RocKordier closed 4 years ago

RocKordier commented 4 years ago

Hey, to avoid excessive cache generation in dev mode I think it is better to use a hash algorithm instead of uniqid. The PhpDumper#L311-L313 also generates a hash with filename and content over all cached files so swarrot generates a diff many times. In this situation symfony generates a new cache container on the filesystem every time.

Thx Eric

odolbeau commented 4 years ago

Very good improvement, thank you @RocKordier! :ok_hand: