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

Symfony Etagging Laravel Package

adsazad/symfony-etagging

Symfony bundle that adds easy ETag support to any Response. Inject EtaggingInterface and wrap rendered responses with etagResponse() to enable caching/conditional requests. Supports custom headers plus configurable max-age and shared max-age.

View on GitHub
Deep Wiki
Context7

Etagging Bundle For Symfony

Installation

composer require adsazad/symfony-etagging

Usage

etagResponse() function will work on any symfony response.

// Add at the top of class
use Adsazad\SymfonyEtaggingBundle\Util\EtaggingInterface;
// Your action
public function myaction(Request $request, EtaggingInterface $etag){
  $response = $this->render('mypage.twig',['parameters'=>'p1']);

// Return Etag Response
  return $etag->etagResponse($response);
}

Add Custom Headers

Add This before Etag Response

// Add Costum Headers
  $ets->addCustom($key, $value);

Set Max Age

// Set Max Age In Seconds (Default 1 Day)
 $ets->setMaxAge(60*60*24); // 1 Day
   
// Set Max Age In Seconds (Default 1 Day)
 $ets->setSharedMax(60*60*10); // 10 Hours
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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
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