Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yongchengchen/laravel_fullpagecache

Full page cache + Lazy load for laravel5
https://github.com/yongchengchen/laravel_fullpagecache

Last synced: 2 days ago
JSON representation

Full page cache + Lazy load for laravel5

Awesome Lists containing this project

README

        

# laravel_fullpagecache
Full page cache + Lazy load for laravel5

Setup

1. Put Ycc folder into your App folder

2. Edit config/app.php

put 'App\Ycc\FpCacheServiceProvider', into provider;

put 'Fpcache' => 'App\Ycc\Facades\Fpcache', into alias

3. Edit 'app/Http/Kernel.php'

put 'App\Ycc\TerminateMiddleware', into global middleware. $middleware

4. Config 'app/Ycc/config/fpcache.php'

You can enable/disable full page cache. Also can whitelist and blacklist.

5. Put public/js/lazypart.js to your app's js folder

Configuration

app/Ycc/config/fpcache.php

'enabled' => true, //enable or disable this module

'blacklist' => array("/auth/login"), //not cached pages

'whitelist' => array(), //pages you only for whitelist

'lifetime' => 100, //cached content lifetime

'jslib' => '', //lazyload js lib configuration


Sample View templating

Here's a sample view template, you just put
@lazyview('uniq-id-of-block')
@endlazyview
and this block will be lazyload by the module automaticly

you can change app.blade.php

@lazyview('user-info')


@endlazyview