bascht/hasbeen.in — pull request #62 by klausmeyer (2014-04-01 19:15:01+00:00)
Title: cache geodata on server using padrino cache

This pull request addresses the issue reported in #59.

Instead of doing the geocoding client-side, the app will do it on the server side and cache the results in tmp files by using the cache feature from padrino. The cache expires after 29 days, so it complines with the google api terms, but in the most cases the cache will be dropped much earlier because heroku will respawn the dynos. In cases the api doesn't return coordinates the location will be skipped and retried on next page load.

This has been tested on heroku already and works because the cache is created in the `tmp` directory which is beside the log directory the only exemption in the heroku read-only filesystem.