Commit Graph

9 Commits (25e399213c11d23783ea583340f1282e5b27db86)

Author SHA1 Message Date
Juan Calderon-Perez 25e399213c
chore: Add support for go1.23 and golangci-lint v1.60.1 (#3101)
* Bump min go to 1.22, bump golangci-lint to v1.60.1, regenerate all msgp

* Fix golanci-lint issues

* Fix golanci-lint issues
2024-08-14 09:14:04 +02:00
leonklingele fd1a29ea79
🚀 Feature: Generate msgp tests (#2263)
* middleware: also generate msgp tests

* middleware/session: drop unused go:generate directive

* middleware: disable msgp's -io option to not generate unused methods
2022-12-11 17:40:07 +01:00
Muhammed Efe Çetin 3b943d79c9
v3: remove internal/template/html, replace internal/memory by internal/storage/memory 2022-06-04 14:19:59 +03:00
Muhammed Efe Çetin 8a15f77fc4
v3: move most deps to go.mod 2022-06-02 17:37:53 +03:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
Vladislav aa229287cf
🔥 Feature: Add max size to cache (#1892)
* Cache middleware size limit

* Replace MaxInt with MaxInt32. Add comments to benchmark

* Avoid allocation in heap push. Small fixes

* Count body sizes instead of entries

* Update cache/readme
2022-05-10 08:50:26 +02:00
Théotime Lévêque 1cddc56f13
Cache middleware: Store e2e headers. (#1807)
*  Cache middleware: Store e2e headers.

As defined in RFC2616 - section-13.5.1, shared caches MUST
store end-to-end headers from backend response and MUST be
transmitted in any response formed from a cache entry.

This commit ensures a stronger consistency between responses
served from the handlers & from the cache middleware.

*  Cache middleware: Add flag for e2e headers.

Set flag to prevent e2e headers caching to
be the default behavior of the cache middleware.
This would otherwise change quite a lot the
experience for cache middleware current users.

*  Cache middleware: Add Benchmark for additionalHeaders feature.

*  Cache middleware: Rename E2Eheaders into StoreResponseHeaders.

E2E is an acronym commonly associated with test.
While in the present case it refers to end-to-end
HTTP headers (by opposition to hop-by-hop), this
still remains confusing. This commits renames it
to a more generic name.

*  Cache middleware: Update README

*  Cache middleware: Move map instanciation.

This will prevent an extra memory allocation for users
not interested in this feature.

*  Cache middleware: Prevent memory allocation when StoreResponseHeaders is disabled.

*  Cache middleware: Store e2e headers. #1807
- use set instead of add for the headers
- copy value from the headers -> prevent problems with mutable values

Co-authored-by: wernerr <rene@gofiber.io>
2022-03-08 10:18:04 +01:00
Fenny 142e6e53be 🩹 fix #1055 2020-12-06 16:43:24 +01:00
Fenny 323d9d89cc 🩹 fix manager logic 2020-11-23 07:38:42 +01:00