spatie / server-side-rendering

Server side rendering JavaScript in a PHP application
https://sebastiandedeyne.com/posts/2018/server-side-rendering-javascript-from-php
MIT License
602 stars 34 forks source link

Improved uniqueness of generated temp file #15

Closed robinvdvleuten closed 6 years ago

robinvdvleuten commented 6 years ago

Hi there! Thanks for this awesome package! I've noticed something while running a performance benchmark that I ran into "file not found" issues. Turns out that when you have multiple requests per second, the temporary filename isn't unique for the same requests in the same second. This PR makes the filename unique per milliseconds and adds some extra randomness to the name.

sebastiandedeyne commented 6 years ago

Thanks!