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.

Cache default value is confusing

See original GitHub issue

Hi, I think cache default value should be 0 by default, because 3600 seems like an arbitrary number.

Also, http-server seems a lot more suitable for development or testing purposes instead of production because of the lacking of pretty basic stuff, like routing.

What do you think?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aletorradocommented, Jan 14, 2017

Caching is usually an opt-in feature, because it may produce unexpected results.

El 14 ene. 2017 15:41, “Jannis Redmann” notifications@github.com escribió:

Hi, I think cache default value should be 0 by default, because 3600 seems like an arbitrary number.

I disagree with 0 as it basically means no caching. 3600 at least seems to be the default of DNS A records. We might want to check the defaults of popular file servers.

Also, http-server seems a lot more suitable for development or testing purposes instead of production because of the lacking of pretty basic stuff, like routing.

I’d argue that routing is not a feature that a production-ready server must have.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/indexzero/http-server/issues/337#issuecomment-272643942, or mute the thread https://github.com/notifications/unsubscribe-auth/AARC_IxIaQF6sxcqc_6md5J3_ngtrVoKks5rSRbLgaJpZM4LjsaK .

0reactions
thornjadcommented, Feb 6, 2019

@aletorrado 3600 is not arbitrary, it’s one hour, which is a normal cache time for a static page. It’s also the default cache time in ecstatic, the core piece of http-server. It also makes sense when coupled with etags.

Closing due to inactivity, please reopen if this is still an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's default value of cache-control? - Stack Overflow
A cache mechanism may cache this page in a private cache and resend it only to a single client. This is the default...
Read more >
disable selector caching by default (only cache a single value)
But I believe that by default a selector should only cache ONE value. If the inputs change, they should throw away all previous...
Read more >
Confusing documentation for cache and artifacts - GitLab.org
Hey guys! I'm following changes on cache and artifacts since early ci-multi-runner and even that - I'm still confused on how to use...
Read more >
3.6.2. Cache variables — CGold 0.1 documentation
Summary¶. Use cache to set global variables; Cache variables fits perfectly for expressing customized options: default value and respect user's value; Type of ......
Read more >
Server-Side Behavior Changes for Cache Settings
Intelligence Server will use a single absolute value representing the left free disk space as a threshold to stop generating caches, the default...
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