Download the PHP package pablok/supercache-bundle without Composer

On this page you can find all versions of the php package pablok/supercache-bundle. 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 supercache-bundle

Note

This bundle is a fork of SupercacheBundle which looks like abandoned.

Maintainability Test Coverage

Branch Build status
master Build Status
latest stable (0.6.0) Build Status

Supercache Bundle

Static pages caching for Symfony Framework.

What is Supercache?

Some of you may be annoyed looking at simple pages loading times - exactly like me. There's a lot solution for that problem - this is extreme one. If you ever used Wordpress you probably seen WP Super Cache plugin. This bundle is build around similar principles (but it is not affiliated in any way) as that plugin.

Basically SupercacheBundle caches whole response to static files and serve them at no cost. It's very useful for pages where there're a lot of static routes visited often.

Installation

Before you start using this bundle you should carefully read HTTP Cache chapter of Symfony Cookbook - it provides a bunch of excellent techniques and tips about caching.

Bundle can be installed like any other Symfony bundle.

  1. Open a command console, enter your project directory and execute following command:
    composer require pablok/supercache-bundle
  2. Enable the bundle by adding following line to app/AppKernel.php file:

  3. Execute following command and follow onscreen instructions app/console supercache:install Currently manual installation is required. You should create webcache directory in root folder and than perform first two steps described in Troubleshooting section below.

Configuration

TBD Default configuration:

Troubleshooting

Installation command failed: Failed to create cache directory

Looks like specified cache directory cannot be created. It can be permission related problem. You can try creating it yourself. To do that simply create desired cache directory (by default it's set to ./webcache/). Next put following content in .htaccess inside cache directory:

Installation command failed: Failed to modify .htaccess (...)

If you (or some other bundle) modified web/.htaccess file, installer may be have trouble automatically applying required changes. You can add following lines manually - they should be placed just below RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] (or similar):

Please note cache path need to be adjusted. Path is relative to web/ directory.

My server doesn't support .htaccess

You have two options: translate rewrite rules (specified above) to format supported by server you use or use PHP-PULL mode. SupercacheBundle contains fallback mode for servers without .htaccess support (e.g. CLI server issued using app/console server:run command). This mode works by attaching to Symfony HTTP kernel and trying locate cached response for given request. Of course it comes with a price - fallback will run PHP intepretter and initialize core of the framework. In my tests DIRECT mode returns response in 3-5ms while PHP-PULL mode need around 30ms.

There's no need to change any configuration options to enable PHP-PULL.

FAQ

Do all responses gets cached?

No, request & response must meet some criteria to be cached:

Are there any limitations?

Yes, there are few:


All versions of supercache-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
symfony/config Version ~2.8|~3.4|~4.1
symfony/console Version ~2.8|~3.4|~4.1
symfony/dependency-injection Version ~2.8|~3.4|~4.1
symfony/filesystem Version ~2.8|~3.4|~4.1
symfony/framework-bundle Version ~2.8.18|~3.4|~4.1
symfony/http-foundation Version ~2.8|~3.4|~4.1
symfony/http-kernel Version ~2.8|~3.4|~4.1
symfony/routing Version ~2.8|~3.4|~4.1
voku/html-min Version ^3.0.1
voku/simple_html_dom Version ^4.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 pablok/supercache-bundle contains the following files

Loading the files please wait ....