NeotomaDB / Neotoma-API

A Placeholder for the Neotoma API
3 stars 1 forks source link

Cache requests for faster retrieval #12

Open scottsfarley93 opened 7 years ago

scottsfarley93 commented 7 years ago

Would it be possible to cache recent request/responses to enable faster responses for commonly accessed queries?

scottsfarley93 commented 7 years ago

This could be done simply by modifying response headers to allow caching. It looks like this is not currently supported. How often is the data really changing in the database, certainly not more than once per day. Thus, a minimum cache of 1 day (but perhaps several or more) would be appropriate.

I think that browsers default to no-cache. I could be wrong on thins. In any case, it would be good to explicitly return a header indicating the expiration timestamp.