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.

Respect HTTP Cache headers

See original GitHub issue

At the moment we simply cache everything coming from a server, and only expire this when refresh is called. I’m not 100% certain if this is the right way to go about things.

It’s worth researching this a bit better.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
evertcommented, Nov 30, 2020

Yeah, it has a bunch of issues… off the top of my head:

  1. No way to programmatically expire
  2. No support for Link: <..>; rel="invalidates" which is really just a variant of 1.
  3. No way to store things in the cache for embedded items, PUT
  4. No support for Prefer: return=representation
  5. Can’t trigger event handlers like the ‘stale’ and ‘update’ events.

So that approach works, but only really if you’re using a simpler subset of ketting’s features.

1reaction
evertcommented, Jun 28, 2020

Thanks for the link. Looks like that could do a lot of the heavy lifting that I didn’t feel like doing 😄

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 >
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...
Read more >
An in-depth introduction to HTTP caching: Cache-Control & Vary
Origin servers communicate their caching instructions to downstream caching proxies by adding a Cache-Control header to their response. This ...
Read more >
Cache-Control - How to Properly Configure It - KeyCDN Support
Cache -Control is an HTTP cache header comprised of directives that allow you to define when and how a response should be cached....
Read more >
HTTP headers | cache-control - GeeksforGeeks
The Cache-Control header is a general header, that specifies the caching policies of server responses as well as client requests.
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