Add caching
Update for compatibility with Elm 0.10.1