mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
Fix httpcache sub-package.
Former-commit-id: d0bf86713bda90ade130c93dcf04d9b26f1e4f08
This commit is contained in:
parent
2d3bd55dd5
commit
3e5f61ff6b
28
HISTORY.md
28
HISTORY.md
|
@ -9,6 +9,34 @@
|
|||
|
||||
## 6.1.4 -> 6.2.0 (√Νεxτ)
|
||||
|
||||
_Update: 12 April 2017_
|
||||
|
||||
```
|
||||
Many of you, including myself, thought that Gerasimos is not accepting any PRs, this is wrong.
|
||||
|
||||
I did a long PR, which actually fixes some bugs and integrations with the godep tool, on a project that he's contributing too.
|
||||
|
||||
The next day I'm logged into my personal twitter and I saw a message written by him.
|
||||
|
||||
He, @kataras, wrote me that he was really impressed by the time I spent to actually fix a bug on an Iris sub-project.
|
||||
He told me that no one did that before and he asked me if I have more time to help these days on the Iris project too.
|
||||
|
||||
And, Here I am! Introducing myself to the most clever community!
|
||||
```
|
||||
|
||||
```
|
||||
Hello,
|
||||
my name is Esemplastic.
|
||||
|
||||
Iris' author, @kataras, is very busy these days on designing the new Iris' release which will contain even more prototypes and it will break any rules you knew so far.
|
||||
I took a sneak preview of it, don't tell to him!
|
||||
|
||||
|
||||
I'm the temporary maintainer of this open-source project and your new friend.
|
||||
```
|
||||
|
||||
- **FIX**: Upgrade the [httpcache](https://github.com/geekypanda/httpcache) vendor. As requested [here](http://support.iris-go.com/d/44-upgrade-httpcache-module).
|
||||
|
||||
|
||||
_Update: 28 March 2017_
|
||||
|
||||
|
|
10
context.go
10
context.go
|
@ -199,11 +199,15 @@ func (c *contextPool) Run(w http.ResponseWriter, r *http.Request, runner func(*C
|
|||
type (
|
||||
|
||||
// Map is just a conversion for a map[string]interface{}
|
||||
// should not be used inside Render when PongoEngine is used.
|
||||
Map map[string]interface{}
|
||||
|
||||
// Context is resetting every time a request is coming to the server
|
||||
// it is not good practice to use this object in goroutines, for these cases use the .Clone()
|
||||
// Context is the "midle-man"" server's object for the clients.
|
||||
//
|
||||
// A New Context is being acquired from a sync.Pool on each connection.
|
||||
// The Context is the most important thing on the Iris' http flow.
|
||||
//
|
||||
// Developers send responses to the client's request through a Context.
|
||||
// Developers get request information from the client's request a Context.
|
||||
Context struct {
|
||||
ResponseWriter // *responseWriter by default, when record is on then *ResponseRecorder
|
||||
Request *http.Request
|
||||
|
|
4
iris.go
4
iris.go
|
@ -722,10 +722,6 @@ func (c *cachedMuxEntry) Serve(ctx *Context) {
|
|||
// ctx.WriteString("Hello, world!") // or a template or anything else
|
||||
// }, time.Duration(10*time.Second))) // duration of expiration
|
||||
// if <=time.Second then it tries to find it though request header's "cache-control" maxage value
|
||||
//
|
||||
// Note that it depends on a station instance's cache service.
|
||||
// Do not try to call it from default' station if you use the form of app := iris.New(),
|
||||
// use the app.Cache instead of iris.Cache
|
||||
func (s *Framework) Cache(bodyHandler HandlerFunc, expiration time.Duration) HandlerFunc {
|
||||
ce := newCachedMuxEntry(s, bodyHandler, expiration)
|
||||
return ce.Serve
|
||||
|
|
|
@ -107,7 +107,7 @@ const (
|
|||
// Arguments should be handled in the manner of fmt.Printf.
|
||||
type LoggerPolicy func(mode LogMode, log string)
|
||||
|
||||
// Adapt addapts a Logger to the main policies.
|
||||
// Adapt adapts a Logger to the main policies.
|
||||
func (l LoggerPolicy) Adapt(frame *Policies) {
|
||||
if l != nil {
|
||||
// notes for me: comment these in order to remember
|
||||
|
|
Loading…
Reference in New Issue
Block a user