Download the PHP package soflomo/cache without Composer

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

Soflomo\Cache

Soflomo\Cache is a command line utility for cache management in Zend Framework

  1. It enables you to manage your Zend\Cache instances from the commandline, including:

    1. Printing a list of all available cache services
    2. Get the status (total space, available space) of all services
    3. Flush the complete cache instance
    4. Clear the cache by expired items
    5. Clear the cache by namespace
    6. Clear the cache by prefix
    7. Removing ZF2 application caches: the merged config and module map files

Installation

Soflomo\Cache works with Composer. Make sure you have the composer.phar downloaded and you have a composer.json file at the root of your project. To install it, add the following line into your composer.json file:

After installation of the package, you need to enable the module by adding Soflomo\Cache to your application.config.php file.

Requirements

  1. Zend Framework 2: the Zend\Cache component
  2. Zend Framework 2: the Zend\Mvc component

Configuration

Soflomo\Cache scans automatically the list of available caches from the caches key in the configuration. This key serves to define your caches as service. If you want to use this key, you must register the cache as abstract factory:

With Soflomo\Cache you are not forced to use the cache abstract factory. The only prerequisite is the cache must be available as a service. You can register your own cache service using e.g. the service manager. For these self-defined caches you cannot use the --list and --status --all commands and you are required to supply the service name of the cache.

Usage

Typing php public/index.php will show you a list of all available commands in your application, including all Soflomo\Cache commands.

List all available caches

NB. You have to define your caches using the abstract factory.

Get the cache status

If you have only one cache defined, this cache is picked. For more than one cache, you will get to choose which cache's status must be printed.

When your cache is defined without using the abstract factory, you must supply the cache name:

All cache statuses are listed with --all:

Note with the --all only caches from the abstract factory are listed.

Flush the cache

If you have only one cache defined, this cache is picked. For more than one cache, you will get to choose which cache's status must be printed.

When your cache is defined without using the abstract factory, you must supply the cache name:

All clearing operations, including --flush will require confirmation via the prompt. Using the command non-interactively, you can use the --force or -f flag:

Clear all expired items

If you have only one cache defined, this cache is picked. For more than one cache, you will get to choose which cache's status must be printed.

When your cache is defined without using the abstract factory, you must supply the cache name:

All clearing operations, including --clear --expired will require confirmation via the prompt. Using the command non-interactively, you can use the --force or -f flag:

Clear items by namespace

If you have only one cache defined, this cache is picked. For more than one cache, you will get to choose which cache's status must be printed.

When your cache is defined without using the abstract factory, you must supply the cache name:

All clearing operations, including --clear --by-namespace=MyNamespace will require confirmation via the prompt. Using the command non-interactively, you can use the --force or -f flag:

Clear items by prefix

If you have only one cache defined, this cache is picked. For more than one cache, you will get to choose which cache's status must be printed.

When your cache is defined without using the abstract factory, you must supply the cache name:

All clearing operations, including --clear --by-prefix=MyPrefix will require confirmation via the prompt. Using the command non-interactively, you can use the --force or -f flag:

Clear the ZF2 application's config cache

Clear the ZF2 application's module map

Clearing opcode cache

At this moment, it is not possible to clear the opcode cache. The opcode caches of CLI and PHP-FPM are not shared and as such, you cannot control the cache from PHP-FPM with the CLI.

Like the Symfony ApcBundle it is required to create a file in the web directory and call that file via HTTP. Then the file itself can clear the PHP-FPM opcode cache. You can track the progress of this feature in the issue #2.


All versions of cache with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
zendframework/zend-cache Version ~2.0
zendframework/zend-mvc Version ~2.0
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 soflomo/cache contains the following files

Loading the files please wait ....