Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Etag Middleware Laravel Package

matthewbdaly/laravel-etag-middleware

Laravel middleware that automatically adds ETag headers to responses, enabling conditional GET requests and 304 Not Modified replies so clients can cache efficiently and save bandwidth. Simple to register and configure per route.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Performance roadmap quick wins: ETags enable conditional GETs and 304 Not Modified responses, reducing bandwidth and improving repeat-load times for cacheable Laravel responses.
  • Build vs. buy: This is a small, single-purpose middleware package. The decision is less “buy vs. build” and more “adopt a tiny MIT package vs. write ~50 lines in-house.” For most teams, an in-house middleware may be preferable unless speed of adoption is the priority.
  • Feature scoping for APIs and content endpoints: Useful for JSON API responses, public content pages, and other GET endpoints where clients/proxies can revalidate cached representations.
  • Low-bandwidth / mobile experience: Supports product goals around faster repeat visits and reduced payloads for users on constrained networks.
  • Infrastructure leverage: Complements CDN, reverse-proxy, and browser caching strategy without requiring application-level response rewriting.
  • Risk/technical-debt assessment: Last release in September 2020 and only 64 GitHub stars are adoption signals that should trigger compatibility and maintenance review before committing.

When to Consider This Package

  • You have an existing Laravel application with cacheable GET responses and want a fast, low-effort ETag implementation.
  • Your product needs conditional request support but does not justify a larger caching platform or custom HTTP caching layer.
  • You are prototyping or validating the value of ETags before investing in a more complete caching strategy.
  • Your team can accept a small dependency and is willing to verify compatibility with your Laravel/PHP version and test ETag behavior behind your CDN/proxy.
  • You need a simple reference implementation or starting point rather than a highly configurable caching solution.

Look elsewhere or build in-house when:

  • You need maintained, version-guaranteed support for current Laravel releases.
  • Your responses are highly dynamic, authenticated, personalized, or require careful cache-key/variant handling.
  • You need strong vs. weak ETag semantics, compression-aware behavior, or precise invalidation rules.
  • You have complex API caching requirements, multi-tenant variance, or strict security/privacy constraints around shared caches.
  • You are already standardizing on a broader HTTP cache, CDN, or API gateway strategy where ETag generation should live centrally.

How to Pitch It (Stakeholders)

For executives: This package is a low-cost performance experiment: it can reduce bandwidth and speed up repeat visits by letting browsers and proxies revalidate cached responses instead of downloading them again. The business case is strongest when we have cacheable GET traffic and want a quick win without a platform investment. The main caveat is maturity: the package has not been released since 2020, so we should treat adoption as a small, testable bet or use it as a reference for an in-house implementation.

For engineering: It is a simple Laravel middleware that adds ETags to responses, enabling 304 conditional responses. The integration surface is small and MIT-licensed, but we should verify compatibility with our Laravel/PHP versions, test behavior with compression and CDN/proxy layers, and confirm cache variance rules for authenticated or personalized responses. Given the package’s age and size, the realistic recommendation is: evaluate quickly, prove the performance impact, and be prepared to replace it with a small maintained in-house middleware if it becomes part of the critical path.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast