1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00

New DirOptions.Cache field for in-memory caching and pre-compression for the fastest possible static file server

Read HISTORY.md it contains a breaking change, second parameter of HandleDir should be iris.Dir(...) instead of just a string

relative to: https://github.com/kataras/iris/issues/1556#issuecomment-661057446


Former-commit-id: 14b48a06fb3b99287dff543932be2937a64233b9
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-07-24 13:03:49 +03:00
parent d697426cb6
commit c3205dafa1
58 changed files with 2581 additions and 9855 deletions

2
cache/browser.go vendored
View File

@@ -92,7 +92,7 @@ const ifNoneMatchHeaderKey = "If-None-Match"
//
// Usage with combination of `StaticCache`:
// assets := app.Party("/assets", cache.StaticCache(24 * time.Hour), ETag)
// assets.HandleDir("/", "./assets")
// assets.HandleDir("/", iris.Dir("./assets"))
//
// Similar to `Cache304` but it doesn't depends on any "modified date", it uses just the ETag and If-None-Match headers.
//