question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Headers request - Add Cache-Control headers to responses

See original GitHub issue

Hi @jakewmeyer

I’ve noticed no Cache-Control headers have been added to the API responses. Since applications might want to optimise their caching providing the Cache-Control headers could be very useful. Would it be possible to add these? I am for example using Retrofit to make API calls. If Cache-Control is added I can less frequent make calls to the API.

Cheers! Jeroen

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jakewmeyercommented, Jun 25, 2020

For launches, yes. Long enough that the db doesn’t get hammered too hard during heavy traffic, yet short enough that time sensitive updates don’t take too long.

1reaction
jeroenboumanscommented, Jun 24, 2020

Would be nice if these can be added to the v3 as well so I can quick add this to my client if it’s not that much work. Will migrate to v4 in the upcoming month probably.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache-Control - HTTP - MDN Web Docs
The Cache-Control HTTP header field holds directives (instructions) — in both requests and responses — that control caching in browsers and ...
Read more >
How to set HTTP headers (for cache-control)? - Stack Overflow
The directive CACHE-CONTROL:NO-CACHE indicates cached information should not be used and instead requests should be forwarded to the origin ...
Read more >
Add a Cache-Control header to the response
Use Amazon CloudFront Functions to add a Cache-Control header to the HTTP response. ... var headers = response.headers; // Set the cache-control header...
Read more >
What is Cache-Control and How HTTP Cache Headers Work
Cache-control is an HTTP header used to specify browser caching policies in both client requests and server responses. Policies include how a resource...
Read more >
Setting Cache control headers for common content types ...
Cache-Control are HTTP cache headers that holds instructions for caching for requests and responses. It is used to defines how a resource is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found