chore: remove reponse cache from root route
This commit is contained in:
parent
a3a4cbaf0f
commit
e235c7aea2
@ -42,7 +42,7 @@ func HandleHLSRequest(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
if hlsCacheAdapter == nil {
|
if hlsCacheAdapter == nil {
|
||||||
ca, err := memory.NewAdapter(
|
ca, err := memory.NewAdapter(
|
||||||
memory.AdapterWithAlgorithm(memory.LFU),
|
memory.AdapterWithAlgorithm(memory.LRU),
|
||||||
memory.AdapterWithCapacity(50),
|
memory.AdapterWithCapacity(50),
|
||||||
memory.AdapterWithStorageCapacity(104_857_600),
|
memory.AdapterWithStorageCapacity(104_857_600),
|
||||||
)
|
)
|
||||||
|
@ -64,13 +64,7 @@ func Start() error {
|
|||||||
log.Warn("unable to create web cache client", err)
|
log.Warn("unable to create web cache client", err)
|
||||||
}
|
}
|
||||||
// The primary web app.
|
// The primary web app.
|
||||||
if enableCache {
|
http.HandleFunc("/", controllers.IndexHandler)
|
||||||
http.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
longerDurationCacheClient.Middleware(http.HandlerFunc(controllers.IndexHandler)).ServeHTTP(rw, r)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
http.HandleFunc("/", controllers.IndexHandler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// The admin web app.
|
// The admin web app.
|
||||||
http.HandleFunc("/admin/", middleware.RequireAdminAuth(controllers.IndexHandler))
|
http.HandleFunc("/admin/", middleware.RequireAdminAuth(controllers.IndexHandler))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user