Remove in-memory caches#36
Closed
dobesv wants to merge 6 commits into
Closed
Conversation
…but adding .gz to the end can be served up to clients that support it. As part of that, changed the code so the Content-Type and Content-Length are sent even for an HTTP HEAD request.
…gth was sent with a 304 not modified response.
Contributor
|
Why was this pull-request never commented on? Seems like a lot of good stuff in here. |
Collaborator
|
It needs to be remerged.
|
phstc
added a commit
that referenced
this pull request
Jun 28, 2013
Remove of in-memory cache, and check for gzipped files. Remerge of PR #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch removes the in-memory caches. It also includes my improvements to support gzip since otherwise the two changes would conflict. Let me know if you'd like a non-gzip-included version of this.
Originally I considered fixing the caching issues I saw, such as:
But I realized that users requiring in-memory caching should do this as part of a smarter middleware component or inside a proxy in front of node rather than leaning on the static files component to deal with it internally.
That way the memory overhead of the cache can be better controlled, monitored, and utilized by all components of the server (or cluster).
The cache as-is will be a kind of liability due to its unbounded size, and creating a full-featured cache might be more appropriate as its own project where dynamically output content within the node server can also benefit from it.
Thanks!
Dobes