Download the PHP package ceeram/clear_cache without Composer

On this page you can find all versions of the php package ceeram/clear_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 clear_cache

ClearCache plugin for CakePHP

ClearCache plugin provides several ways how to clear CACHE subfolders and cache engines in CakePHP applications.

Requirements

The master branch has the following requirements:

For CakePHP 1.3 use the 1.3 branch.

Installation

Usage

Console Shell

Run from your APP folder:

# clear all cached files and configured engines
Console/cake ClearCache.clear_cache

# clear all cached files
Console/cake ClearCache.clear_cache files
# clear just files in CACHE folder
Console/cake ClearCache.clear_cache files .
# clear just files in CACHE subfolders
Console/cake ClearCache.clear_cache files *
# clear just files in CACHE/views folder
Console/cake ClearCache.clear_cache files views
# clear just files in selected CACHE subfolders
Console/cake ClearCache.clear_cache files models persistent

# clear all configured cache engines
Console/cake ClearCache.clear_cache engines
# clear just engine named _cake_core_
Console/cake ClearCache.clear_cache engines _cake_core_
# clear just selected engines
Console/cake ClearCache.clear_cache engines default sessions

# clear all configured cache groups
Console/cake ClearCache.clear_cache groups
# clear just cache group named comment
Console/cake ClearCache.clear_cache groups comment
# clear just selected groups
Console/cake ClearCache.clear_cache groups comment post

By default, running the shell will only display a total number of items cleaned. Use the -v flag to get list of items deleted:

# clear all cached files and configured engines
Console/cake ClearCache.clear_cache -v
# clear all cached files
Console/cake ClearCache.clear_cache files -v
# clear just engine named _cake_core_
Console/cake ClearCache.clear_cache engines _cake_core_ -v

Library Class

Similarly, run from your application code:

App::uses('ClearCache', 'ClearCache.Lib');
$ClearCache = new ClearCache();

$output = $ClearCache->run();

$output = $ClearCache->files();
$output = $ClearCache->files('.');
$output = $ClearCache->files('*');
$output = $ClearCache->files('views');
$output = $ClearCache->files('models', 'persistent');

$output = $ClearCache->engines();
$output = $ClearCache->engines('_cake_core_');
$output = $ClearCache->engines('default', 'custom');

$output = $ClearCache->groups();
$output = $ClearCache->groups('comment');
$output = $ClearCache->groups('comment', 'post');

Method files() returns an associative array of deleted/undeleted files:

array(
    'deleted' => array(...),
    'error'   => array(...)
)

Method engines() returns an associative array of result:

array(
    'default' => true,
    '_cake_core_'   => false
)

Method groups() returns an associative array of result:

array(
    'comment' => array(
        'default' => true,
    ),
    'post' => array(
        'default' => true,
        'advanced' => true,
    ),
)

Method run() returns an associative array of result:

array(
    'files' => array(
        'deleted' => array(...),
        'error'   => array(...)
    ),
    'engines' => array(
        'default' => true,
        '_cake_core_'   => false
    )
)

Panel for DebugKit toolbar

In AppController, configure usage of ClearCache panel for DebugKit toolbar:

public $components = array(
    'DebugKit.Toolbar' => array(
        'panels' => array('ClearCache.ClearCache')
    )
);

Optionally, mainly for situations when debug is disabled and DebugKit is configured with 'forceEnable' => true, it is possible to restrict clearing of CACHE subfolders and cache engines/groups through DebugKit panel to specific items only (string or array of strings under folders/engines/groups keys) and/or enable every ones with special string all:

public $components = array(
    'DebugKit.Toolbar' => array(
        'panels' => array('ClearCache.ClearCache'),
        'clear_cache' => array(
            // allow to clear just files in CACHE/views folder
            'folders' => 'views'
            // allow to clear all cache engines at once, and selected ones separately
            'engines' => array('_all_', 'default', 'sessions'),
            // allow to clear all cache groups at once, and selected ones separately
            'groups' => array('_all_', 'comment', 'post'),
        )
    )
);

Clearing cache groups

Cache groups were introduced in CakePHP 2.2 and they are shared across all cache configs using the same engine and same prefix. Despite of this, ClearCache plugin clears WHOLE cache groups - even if they're specified in cache configurations with different cache engines and different prefixes.


All versions of clear_cache with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version *
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 ceeram/clear_cache contains the following files

Loading the files please wait ....