Download the PHP package winzou/cache-bundle without Composer

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

winzouCacheBundle

Bundle is deprecated. Use https://github.com/doctrine/DoctrineCacheBundle instead.

What's that?

winzouCacheBundle provides a simple cache management. Now you can use a cache system without reinventing it. It supports Apc, XCache, File, ZendData and Array.

Installation

1. Add this bundle to your project:

Using composer

Add the following lines in your composer.json file:

Now, run composer to download the bundle:

2. Add this bundle to your application's kernel:

Usage

In your controller:

$cache = $this->get('winzou_cache.apc');
// or
$cache = $this->get('winzou_cache.file');
// or
$cache = $this->get('winzou_cache.memcache');
// or
$cache = $this->get('winzou_cache.array');
// or
$cache = $this->get('winzou_cache.xcache');
// or
$cache = $this->get('winzou_cache.zenddata');
// or
$cache = $this->get('winzou_cache'); // in that case, it will use the default driver defined in config.yml, see below

$cache->save('bar', array('foo', 'bar'));

if ($cache->contains('bar')) {
    $bar = $cache->fetch('bar');
}

$cache->delete('bar');

See Cache\AbstractCache for all the available methods.

Configuration

When using FileCache, if you don't want to store your cache files in %kernel.cache_dir%/winzou_cache (default value), then define the absolute path in your config.yml:

winzou_cache:
    options:
        cache_dir: %kernel.cache_dir%/MyAppCache
# or    cache_dir: /tmp/MyAppCache/%kernel.environment%

If you want to define in only one place the driver you want to use, you will like the default_driver option:

winzou_cache:
    options:
        default_driver: apc # default is "lifetimefile"

# and then $cache = $this->get('winzou_cache')

You can now access the ApcCache with the winzou_cache service. And if you want to change the driver, you have to modify only one value in your config.yml.

If you don't define the default_driver and use $this->get('winzou_cache'), then you are using the FileCache.

Raw access

You can overwrite any option just by using the factory service. See these two very similar methods:

$factory = $this->get('winzou_cache.factory');
$cache = $factory->getCache('file', array('cache_dir' => '/tmp/cache'));

Or by defining your own service:

your_cache:
    factory_service: winzou_cache.factory
    factory_method:  get
    class:           %winzou_cache.driver.abstract%
    arguments:
        - file                       # just modify this value to use another cache
        - {'cache_dir': /tmp/cache } # you can omit this if you don't use FileCache or if the default value is ok for you

# and then $cache = $this->get('your_cache')

All versions of cache-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
symfony/symfony Version >=2.0
doctrine/common Version >=2.2
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 winzou/cache-bundle contains the following files

Loading the files please wait ....