Download the PHP package narekmarkosyan/yii2-html-cache without Composer

On this page you can find all versions of the php package narekmarkosyan/yii2-html-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-html-cache

Yii2 HTML cache

Yii2 HTML Cache generates cache file with FULL HTML of your action from DOCTYPE to </html>.

This is an extension for Yii 2.x, if you have Yii 1.x use Yii HTML Cache

Instalation

Run

or add

to require section of your composer.json.

Add following to your components in configs

Usage

Add following code at the beginning of beforeAction method in your controller

Where $action is a first parameter of beforeAction. Or if you don't have beforeAction add the following code to your controller

Add the following code at the end of renderContent method in your controller

Where $output is a first parameter of renderContent. Or if you don't have renderContent add the following code to your controller

Settings

NOTE 1: in excluded_params you need to store Controller variables, not $_GET/$_POST/$_REQUEST variables

NOTE 2: you can add excluded action or parameter from controller by calling excludeActions and excludeParams methods. See Additional features section

Additional features

There are few additional methods you can use in your controller.

directReplace

If you have some parts in your HTML that need to be loaded dynamically in cache you can use placeholders in view and then replace them with directReplace method.

Params

There are two ways for parameters

OR

Usage

In view

In beforeAction method of your controller

NOTE: placeholder always needs to be UPPERCASE and in {BRACES}

excludeActions

Adding action to the list of excluded actions.

Params

Usage

In beforeAction method of your controller

allowActions

Removes action from excluded actions list.

Params

Usage

In beforeAction method of your controller

excludeParams

Adding params to the list of excluded params.

Params

Usage

In beforeAction method of your controller

allowParams

Removes params from the list of excluded params

Params

Usage

In beforeAction method of your controller

FAQ

I'm doing everythink like described but it doesn't work.

hmm...


All versions of yii2-html-cache with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
narekmarkosyan/yii2-html-cache Version v1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package narekmarkosyan/yii2-html-cache contains the following files

Loading the files please wait ....