Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New middlewares for various client cache methods that can speed your pages even more #935

Merged
merged 5 commits into from
Mar 18, 2018

Conversation

kataras
Copy link
Owner

@kataras kataras commented Mar 18, 2018

  • Cleanup of some old code: 46846d5

  • Add new handlers for client (i.e browser) caching: cache.NoCache and cache.StaticCache including tests by @speedwheel via PR: Add some useful cache middlewares for client (i.e browser) catching #934

  • Add one more browser (and 304 server) cache method using ETag and If-None-Match headers and replace the ctx.WriteWithExpiration with simple ctx.Write at StaticEmbeddedHandler of core/router/fs.go, now that we have plenty of options for client cache give the end-dev the oportunity to use them or not on static embedded handlers: 16c473a

kataras and others added 5 commits March 17, 2018 02:27
Remove the StaticCacheDuration unused package-level variable from context/context.go and /core/router/api_builder.go it should be removed a year ago, now all the cache funcs and middlewares accept their own options |  Remove duplicated header keys that are used on both context/context.go and core/router/fs.go by exporting context's one.
…None-Match headers

And replace the 'ctx.WriteWithExpiration' with simple 'ctx.Write' at 'StaticEmbeddedHandler' of core/router/fs.go, now that we have plenty of options for client cache give the end-dev the oportunity to use them or not on static embedded handlers
@kataras kataras merged commit 73e3b04 into master Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant