evheniy/html5-cache-bundle
Composer 安装命令:
composer require evheniy/html5-cache-bundle
包简介
The HTML5CacheBundle adds the ability to add HTML5 Application Cache to your application.
README 文档
README
This bundle provides HTML5 Application Cache for Symfony2
Installation
$ composer require evheniy/html5-cache-bundle "1.*"
Or add to composer.json
"evheniy/html5-cache-bundle": "1.*"
AppKernel:
public function registerBundles()
{
$bundles = array(
...
new Evheniy\HTML5CacheBundle\HTML5CacheBundle(),
);
...
config.yml:
#HTML5CacheBundle
html5_cache: ~
or
#HTML5CacheBundle
html5_cache:
cdn: cdn.site.com
http: true
https: false
custom_urls:
- https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js
- ...
layout.html.twig:
<html{{- cache_manifest()|raw -}}>
...
The last step
app/console manifest:dump
Documentation
You can use local CDN (domain):
html5_cache:
cdn: cdn.site.com
Default value is empty
You can set protocols for local CDN:
html5_cache:
cdn: cdn.site.com
http: true
https: false
Default value: true (for both)
You can set custom urls:
html5_cache:
custom_urls:
- https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js
- ...
Default value is empty
Partial using
layout.html.twig:
<html{%- block cache_manifest -%}{%- endblock -%}>
...
page_with_cache.html.twig:
{%- extends "layout.html.twig" -%}
{%- block cache_manifest -%}{{- cache_manifest()|raw -}}{%- endblock -%}
...
page_without_cache.html.twig:
{%- extends "layout.html.twig" -%}
{%- block cache_manifest -%}{%- endblock -%}
...
JqueryBundle
If You are using JqueryBundle, this url:
https://ajax.googleapis.com/ajax/libs/jquery/{JqueryBundle.config.version}/jquery.min.js
will be inserted automatically
TwitterBootstrapBundle
If You are using TwitterBootstrapBundle, those urls:
- https://maxcdn.bootstrapcdn.com/bootstrap/{TwitterBootstrapBundle.config.version}/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/{TwitterBootstrapBundle.config.version}/css/bootstrap-theme.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/{TwitterBootstrapBundle.config.version}/js/bootstrap.min.js
will be inserted automatically
MaterializeBundle
If You are using MaterializeBundle, those urls:
- https://cdnjs.cloudflare.com/ajax/libs/materialize/{MaterializeBundle.config.version}/css/materialize.min.css
- https://cdnjs.cloudflare.com/ajax/libs/materialize/{MaterializeBundle.config.version}/js/materialize.min.js
will be inserted automatically
License
This bundle is under the MIT license.
Demo - Open page, then turn off network and update page
evheniy/html5-cache-bundle 适用场景与选型建议
evheniy/html5-cache-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.38k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 04 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「cache」 「HTML5」 「HTML5 Application Cache」 「Cache Manifest」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 evheniy/html5-cache-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 evheniy/html5-cache-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 evheniy/html5-cache-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
HTML5 support for SilverStripe
repository php library
HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
The bundle for easy using json-rpc api on your project
The yii2-videojs-widget is a Yii 2 wrapper for the [video.js](http://www.videojs.com/). A JavaScript and CSS library that makes it easier to work with and build on HTML5 video. This is also known as an HTML5 Video Player.
Laravel 5 - Repositories to the database layer
统计信息
- 总下载量: 2.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 20
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-24