cakephp/cakephp — pull request #766 by ADmad (2012-08-10 22:17:12+00:00)
Title: Js::writeBuffer() incorrectly returns script tag with url to cache file if following 3 conditions are true:

1. Js::writeBuffer() is called with `inline` and `cache` options true
2. Configure var Cache.disable is true
3. No cache file for the buffered script exits

So I added check to use file url only if file exists or call to `cache()` succeeded else just return script tag with inline js contents. That's a sensible approach rather than linking to non existent file.