Вопрос

I am looking for something like cacheSeconds for the subsite generated by Yesod.Static in order to control caching of static resources. Is it possible?

Это было полезно?

Решение

Yes. Yesod.Static is just a Yesod wrapper around wai-app-static, which is a general purpose WAI static file server. You want to set the ssMaxAge setting. Depending on exactly what your code looks like now, this could be something along the lines of:

Static settings <- static "/some/static/path"
let newStatic = Static $ settings { ssMaxAge = NoMaxAge }
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top