yesodweb/yesod-scaffold — pull request #15 by paul-rouse (2014-01-26 12:23:12+00:00)
Title: Proper use of clockDateCacher in scaffolding

wai-extra-2.0.3.1 fixes the most serious manifestation of failing to call the updater returned by clockDateCacher, but the same issue applies to the logger saved in the foundation in makeFoundation. This can easily be shown by adding '$(logWarn)' to the getHomeR handler in a freshly scaffolded site.

The fix here updates the cache every time the date/time getter is called, and I suppose this may not suit all situations. Ideally we might want to use the same cache as the RequestLogger, so that the update gets done for us, but that would require lots of reorganisation to expose it. Alternatively, we might write another updating thread, and start it, in makeFoundation, but that seems overly complex if the appLogger is used only rarely. Feel free to reject if you think this needs more thought!