Initial import

This is my first push of code to GitHub, made as a pull request for easier review
How about moving this `if()` to the top-level and only registering the `install` event listener if `preCacheItems` is set to an `Array`?

Or are there some timing considerations here, and `preCacheItems` might not be properly initialized until the `install` event is fired? If that's the case, could you make that clear in a comment?