Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yongchengchen/laravel_fullpagecache
- Owner: yongchengchen
- Created: 2015-07-12T22:59:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-13T10:09:29.000Z (over 9 years ago)
- Last Synced: 2023-02-28T20:16:06.202Z (over 1 year ago)
- Language: PHP
- Size: 141 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# laravel_fullpagecache
Full page cache + Lazy load for laravel5Setup
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