2017 © Pedro Peláez
 

library responsecache

Response cache for Laravel 5.1

image

waavi/responsecache

Response cache for Laravel 5.1

  • Thursday, August 10, 2017
  • by sildraug
  • Repository
  • 2 Watchers
  • 2 Stars
  • 164 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

HTTP Response Cache for Laravel 5

Latest Version on Packagist Software License Build Status Total Downloads, (*1)

Developed for Laravel 5.1 and based on Spatie's Response cache this package allows you to cache successful GET Requests for non logged in users., (*2)

WAAVI is a web development studio based in Madrid, Spain. You can learn more about us at waavi.com, (*3)

Laravel compatibility

Laravel translation
5.1.x 1.0.x
5.2.x 1.0.1 and up
5.3.x 1.0.2 and up

Installation

You may install the package via composer, (*4)

composer require waavi/responsecache 1.x

Add the service provider:, (*5)

// config/app.php

'providers' => [
    ...
    \Waavi\ResponseCache\ResponseCacheServiceProvider::class,
];

To enable the ResponseCache facade:, (*6)

// config/app.php

'aliases' => [
    ...
   'ResponseCache' => \Waavi\ResponseCache\Facades\ResponseCache::class,
];

Publish the config file, (*7)

php artisan vendor:publish --provider="Waavi\ResponseCache\ResponseCacheServiceProvider"

Usage

Cache middleware

You may now use the cache middleware in your routes to cache successful GET requests from non logged in users. By default responses a cached for 24 hours., (*8)

// app/Http/routes.php

Route::get('/', ['middleware' => 'cache', 'uses' => 'HomeController@home']);

Clearing the cache

You may clear the cache using the provided facade:, (*9)

\ResponseCache::clear();

Or through the provided artisan command, (*10)

php artisan responsecache:clear

In case your cache store allows for tags, then only the response cache will be cleared. Otherwise your whole app cache will be cleared., (*11)

The Versions

10/08 2017

dev-master

9999999-dev

Response cache for Laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache response cache waavi responsecache

10/08 2017

1.0.3

1.0.3.0

Response cache for Laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache response cache waavi responsecache

24/08 2016

1.0.2

1.0.2.0

Response cache for Laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache response cache waavi responsecache

16/03 2016

1.0.1

1.0.1.0

Response cache for Laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache response cache waavi responsecache

24/12 2015

1.0

1.0.0.0

Response cache for Laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel cache response cache waavi responsecache