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

Response Cache Laravel Package

matchory/response-cache

A Laravel middleware package that stores full HTTP responses and serves repeat requests straight from the cache instead of hitting your application. Configure which routes to cache, set lifetimes, and invalidate entries to cut response times and database load.

View on GitHub
Deep Wiki
Context7

Getting Started

This is a first-pass assessment based on the 1.5.2 release. The headline is that the package now declares support for Laravel 12; the rest of the release is housekeeping (dev tooling), so the public API you'd learn day-to-day is unchanged from the rest of the 1.5.x line.

Minimal steps to get productive:

  1. Confirm the constraint before you install. Read the package's composer.json require block rather than trusting the changelog. A "support for Laravel 12" chore is usually a widened illuminate/* constraint (e.g. ^10.0|^11.0|^12.0) plus a bumped php floor. Check your app's php version satisfies it — Laravel 12 apps are on PHP 8.2+, and if the package bumped its minimum, older apps can silently fail resolution.
  2. Install narrowly.
    composer require vendor/package:^1.5 --with-all-dependencies
    
    Then verify only the intended packages moved: composer.lock diff should show the package and at most its transitive deps.
  3. Look at the service provider and config first, not the README examples. If the package ships a config file:
    php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider" --tag=config
    
    Read every key and its default — for most Laravel packages 80% of day-to-day leverage is a handful of config flags, and defaults are chosen for the lowest common denominator, not your app.
  4. First use case: pick one small, real, low-blast-radius call site in your app and wire the package there. One controller or one queued job. Verify it in a test before you spread it across the codebase.

Implementation Patterns

Wrap it behind your own boundary. Even for a package you like, don't call its facade from thirty places. Put a thin adapter or a small service class in app/ that owns the dependency, and inject that. When 2.0 lands (or when you swap the package out), you change one file. This also makes it trivial to fake in tests without relying on the package's own test helpers.

Config-driven, environment-scoped. Register the package's config in config/ and read it via config('package.key'), never env() at call time. If credentials or endpoints differ per environment, put them in .env and reference them only inside the config file so php artisan config:cache doesn't surprise you in staging.

Laravel 12 middleware registration. If the package ships middleware, the Laravel 12 skeleton has no app/Http/Kernel.php. Register it in bootstrap/app.php:

->withMiddleware(function (Middleware $middleware) {
    $middleware->alias(['package-feature' => \Vendor\Package\Middleware\Feature::class]);
})

This is the single most common place a package that "supports Laravel 12" still needs you to do manual work, because provider-side registration and app-side registration are different things.

Queue the heavy paths. Anything the package does that touches the network or does non-trivial work belongs in a job, not a request cycle. Wrap the call in your own ShouldQueue job so retries, backoff, and failure handling are yours, and so you can move it to a dedicated queue later without touching callers.

Version-pin with intent. Use ^1.5 in composer.json and let the lockfile do the pinning. Do not pin to 1.5.2 exactly — you want patch fixes for a package that just proved it's tracking framework releases.

Gotchas and Tips

  • "Chore: added support for Laravel 12" is not automatically safe. Widening a framework constraint often drags in a minor bump of an illuminate/* component or a dev-dependency that leaks into the runtime graph. Run composer update vendor/package --with-dependencies -W and actually read the lock diff.
  • Clear the caches after upgrading. php artisan config:clear && php artisan cache:clear && composer dump-autoload (or optimize:clear). Stale package manifests and cached config are the cause of most "it worked locally" upgrade bugs with packages that publish config or register providers.
  • Test matrix, not vibes. If your app runs L11 and you're eyeing L12, run the suite under both before you trust the changelog. A widened constraint says the package author's CI is green, not that your integration is.
  • "Improved development tooling" can mean changed test fixtures or CI scripts only — usually nothing for consumers. But if the package publishes stubs, migrations, or assets, re-publish to a temp directory and diff against what you have rather than overwriting in place.
  • Config drift on upgrade. Published config files are never updated by composer update. After a minor release, diff the package's config/ against your published copy; new keys silently fall back to the package default (usually null or false), which can look like a bug.
  • Extension points: before you fork or copy the package's internals, check for a bound interface or a Factory/Manager class in the container. Most well-maintained Laravel packages let you $this->app->bind(...) a custom driver, and that's the supported upgrade-safe seam.
  • Debugging: if a call returns something nonsensical, dd(app(\Vendor\Package\Client::class)) — resolving the concrete class out of the container shows you the actual bound config and collaborators, which is often not what you assumed from the README.
  • Semver read: 1.5.2 being a patch with only chores is a strong signal the maintainer treats API changes as minor/major boundaries. Safe to take. Re-evaluate at 1.6.0 — that's where new surface area and deprecations would appear.
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route