kriswallsmith/assetic — pull request #249 by joec4i (2012-07-05 09:35:28+00:00)
Title: Fix #61

I had a similar problem to #61. Under Symfony2.1 dev environment, assets might not be loaded correctly. It turns out that the random hashes created by the yui compressor filter might not be unique enough. So the filter could use the same temp file for different assets.

The random hash uses combination of time() and rand() as the source.
```$hash = substr(sha1(time().rand(11111, 99999)), 0, 7);```

But there's a great chance that parallel requests to the same php server get the same result from rand(). Changing time() to microtime() fixed the problem in most cases. Or a better random hash generator can be used for this.

Code to reproduce the problem:
rand_test.html
```html

```
test.php
```php

document.write('' + '
');
```