Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Laravel
  3. Laravel Responsecache

Laravel Responsecache

MITPHP8.6.0

A Laravel package that caches entire HTTP responses to dramatically speed up application performance.

Visit WebsiteGitHubGitHub
2.8k stars249 forks0 contributors

What is Laravel Responsecache?

Laravel ResponseCache is a PHP package that dramatically speeds up Laravel applications by caching entire HTTP responses. It intercepts successful GET requests, stores the complete response (including HTML, JSON, or other text-based content), and serves cached versions for subsequent identical requests without processing them through the full application stack.

Target Audience

Laravel developers building content-heavy applications, APIs, or websites where response times matter and where identical requests are common, such as blogs, e-commerce platforms, or content management systems.

Value Proposition

Developers choose this package because it provides a simple, middleware-based approach to full-page caching that integrates seamlessly with Laravel's ecosystem, offers flexible caching strategies including grace periods for stale content, and significantly reduces server load without requiring complex configuration.

Overview

Speed up a Laravel app by caching the entire response

Use Cases

Best For

  • Speeding up Laravel applications with mostly static or semi-static content
  • Reducing server load on high-traffic Laravel websites or APIs
  • Caching API responses that don't change frequently
  • Improving performance of Laravel-based blogs, news sites, or documentation portals
  • Implementing full-page caching without manual cache management in controllers
  • Adding response caching to specific routes with configurable TTL values

Not Ideal For

  • Applications with real-time, user-specific data like live dashboards or personalized feeds
  • APIs that require immediate data freshness without any caching staleness
  • Projects relying heavily on non-GET HTTP methods or file downloads

Pros & Cons

Pros

Full Response Caching

Caches entire HTTP responses for successful GET requests, including headers and content, which dramatically reduces server load as shown in the route examples for /posts.

Flexible Caching Strategies

Supports standard caching and flexible caching with grace periods, allowing stale responses to be served while refreshing in the background, as demonstrated with FlexibleCacheResponse for routes like /dashboard.

Easy Middleware Integration

Uses Laravel middleware for simple configuration, making it straightforward to apply caching to specific routes with configurable TTL without modifying controller logic.

Automatic Invalidation Support

Provides built-in mechanisms to clear cache on content changes or events, though implementation details require consulting the documentation for specific use cases.

Cons

GET-Only Limitation

Only caches successful GET requests with text-based content, excluding other HTTP methods like POST or PUT and non-text responses such as file downloads, limiting its scope for dynamic APIs.

Cache Management Overhead

For applications with frequent updates, cache invalidation can become complex, requiring custom event handling to avoid serving stale data, which isn't fully automated out of the box.

Dependency on Cache Driver

Performance and scalability depend on the underlying Laravel cache driver, which may need additional configuration or tuning for high-traffic or distributed environments.

Frequently Asked Questions

Quick Stats

Stars2,822
Forks249
Contributors0
Open Issues0
Last commit3 days ago
CreatedSince 2015

Tags

#laravel#web-optimization#performance-optimization#varnish#php-package#cache#php#http-caching#server-side-caching#middleware#performance

Built With

P
PHP
L
Laravel

Links & Resources

Website

Included in

Laravel13.0k
Auto-fetched 1 day ago

Related Projects

LiveWireLiveWire

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

Stars23,591
Forks1,756
Last commit1 day ago
Debug BarDebug Bar

Debugbar for Laravel (Integrates PHP Debug Bar)

Stars19,292
Forks1,614
Last commit11 days ago
IDE HelperIDE Helper

IDE Helper for Laravel

Stars14,970
Forks1,195
Last commit1 month ago
Intervention ImageIntervention Image

PHP Image Processing

Stars14,378
Forks1,501
Last commit6 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub