digidem / simple-odk

A minimal ODK server for receiving form submissions from a mobile device and saving them as JSON on github
19 stars 9 forks source link

Cache formLists #3

Open gmaclennan opened 9 years ago

gmaclennan commented 9 years ago

Cloudflare is a very easy and cheap way to reduce server load, caching pages in a CDN. We can't use it on the route domain though because the timeout is too short for form submissions from a slow connection. Currently creating the form lists is expensive (it calculates the md5 of each file every time), so this would benefit from being in a CDN. We could redirect formList requests to a subdomain that is cached on Cloudflare's network. Worth the effort? Current in-memory caching in f3a31736a59de91367563d39f36178deb2052b63 may be enough. Another option to improve caching would be to cache components of a form list.