pozitronik/yii2-cachedwidget 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pozitronik/yii2-cachedwidget

最新稳定版本:1.1.0

Composer 安装命令:

composer require pozitronik/yii2-cachedwidget

包简介

Caching support for Yii2 widgets

README 文档

README

Caching support for Yii2 widgets

Installation

The preferred way to install this extension is through composer.

Run

php composer.phar require pozitronik/yii2-cachedwidget "dev-master"

or add

"pozitronik/yii2-cachedwidget": "dev-master"

to the require section of your composer.json file.

Requirements

Yii2, PHP >= 7.2.0

Usage

Once the extension is installed, simply inherit any widgets from pozitronik\widgets\CachedWidget class instead of yii\base\Widget in your code.

CachedWidget has redefined render() method, that stores all rendered views in Yii2 global cache (with nested widgets, if its called in view file).

Widget handles correctly Yii2 view assets and inline resources, like js/css files or inline code inclusion.

Caching is disabled by default within YII_ENV_DEV environment (see $disable property).

Example

 class MyWidget extends \pozitronik\widgets\CachedWidget {
 // it is all, mostly
 }

统计信息

  • 总下载量: 3.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2020-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固