Download the PHP package ademes/acetone without Composer

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

Acetone

Laravel5 package for purging, refreshing & banning cached items in Varnish

Using web accelerators such as varnish to speed up your web application has become common place. This small package is designed to alleviate the problem of cache expiration with dynamic data generated sites.

Installation

Begin by adding the following to your composer.json

"require": {
    "jdare/acetone": "dev-master"
}

Run a composer update composer update

Add it to your list of providers in laravel /app/app.php

'providers' => array(
    ...
    'JDare\Acetone\AcetoneServiceProvider',
),

Publish the configuration file using php artisan config:publish jdare/acetone

Configuration

Open the newly generated config file app/config/packages/jdare/acetone/config.php

The configurable options are:

The documentation for each option is available inside the file.

Usage

Please Note: All these functions assume some sort of standard VCL setup for purging/refreshing/banning. Please check the docs folder for a reference on how your varnish should interpret these requests.

For the differences between Purge, Refresh and Ban, please check the Varnish documentation.

Purge & Refresh

When you need to invalidate your cache, you can provide a URL to be removed as a parameter for Acetones functions. Here are some sample usages:

function someAction()
{
    //update some information in a template or database

    Acetone::purge("/post/my-updated-post"); //Removed old version from Varnish

    //Alternatively use Acetone::refresh("/post/my-updated-post") if it suits your caching needs better.
}

Both Purge and Refresh will accept arrays of URL's, however be warned each url will need an individual request to varnish. This can end up having a large overhead and can massively increase your response time.

To better invalidate mass URL's use Ban or BanMany

Ban & BanMany

Ban will work the same way as Purge and Refresh if needed, however it can also accept an optional parameter to make it match a Regex string rather than a URL.

function someAction()
{
    //update some information in a template or database

    Acetone::ban("^/post", true); //will remove any URL's matching "/post(.*)"
}

A helper function is available for mass banning, called "banMany", e.g.

Acetone::banMany("/post"); //will ban any URL starting with /post

ban & banMany are much more efficient ways to remove lots of URL's due to Varnish' pattern matching, rather than having to make a single request for every URL.

FAQ

Purge returns a 404 exception.

Client error response [status code] 404 [reason phrase] Not in cache [url] *URL*

If your VCL is setup to throw a 404 when a purge item is not in the cache, Guzzle will throw an exception. These will only occur locally and be supressed automatically when used in a production environment. However you can disable them permanently, by setting force_exceptions to false in the config.php


All versions of acetone with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/support Version 4.x
guzzle/guzzle Version 3.7.*
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 ademes/acetone contains the following files

Loading the files please wait ....