Add /cache route
This commit is contained in:
@@ -107,11 +107,11 @@ func (s *Server) AddHandler() httprouter.Handle {
|
||||
}
|
||||
}
|
||||
|
||||
// CachedHandler ...
|
||||
func (s *Server) CachedHandler() httprouter.Handle {
|
||||
// CacheHandler ...
|
||||
func (s *Server) CacheHandler() httprouter.Handle {
|
||||
return func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||
ctx := NewContext(s.config, s.db, r)
|
||||
s.render("cached", w, ctx)
|
||||
s.render("cache", w, ctx)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user