Download the PHP package tedivm/stash-bundle without Composer

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

TedivmStashBundle Build Status

License Latest Stable Version Coverage Status Total Downloads

The TedivmStashBundle integrates the Stash caching library into Symfony, providing a powerful abstraction for a range of caching engines. This bundle provides a caching service, adds Stash information to the Web Profiler toolbar, and adds integration for the Doctrine Common Cache library.

Both the bundle and Stash are licensed under the New BSD License. Please fork us on Github!

Installation

Add the bundle using composer, either by requiring it on the command line:

or by adding it directly to your composer.json file:

Add the bundle to app/AppKernel.php:

And then set the basic configuration in app/config/config.yml:

Usage

Just fetch the default cache pool service:

Or a custom-defined cache pool:

Then you can use the cache service directly:

(See the Stash documentation for more information on using the cache service.)

Configuration

Default Cache Service

To get started quickly, you can define a single caching service with a single driver:

This cache service will be registered as stash.default_cache, which will also be automatically aliased to cache.

Configuring Drivers

You can set the individual parameters of the cache driver directly in the configuration:

Multiple Drivers

If you want to use multiple drivers in sequence, you can list them separately:

The cache service will automatically be configured with a Composite driver, with the drivers queried in the specified order (for example, in this example, Apc would be queried first, followed by FileSystem if that query failed.)

In-Memory

By default, every cache service includes in-memory caching: during the lifetime of a single request, any values stored or retrieved from the cache service will be stored in memory, with the in-memory representation being checked before any other drivers. In some circumstances, however (such as long-running CLI batch scripts) this may not be desirable. In those cases, the in-memory driver can be disabled:

Doctrine Adapter

Stash provides a Doctrine cache adapter so that your Stash caching service can be injected into any service that takes a DoctrineCacheInterface object. To turn on the adapter for a service, set the parameter:

For the default cache, the Adapter service will be added to the container under the name stash.adapter.doctrine.default_cache. You can use it anywhere you'd use a regular Doctrine Cache object:

Session Adapter

Stash provides a session adapter to allow Symfony sessions to be stored directly inside the cache. To turn on the adapter, set the parameter:

Once it's enabled, enable it in the framework bundle and it will automatically be used:

Logger

Stash supports PSR Compliant logging libraries, you can specify which library is used by passing the logger's service name as a parameter:

Multiple Services

You can also configure multiple services, each of which stores is entirely separate:

Each service is defined with keys inside a separate, distinct internal namespace, so you can use multiple services to avoid key collisions between distinct services even if you only have a single backend available.

When multiple caches are defined, you can manually define a default, which will be aliased to the stash service:

If you don't, the first service defined will be set as the default.

Tracking

StashBundle includes a module which tracks the keys of all cache queries made during a request for debugging purposes. By default this module is enabled in the dev and test environments but disabled elsewhere. However, if you want to override the default behavior, you can enable or disable this behavior in the configuration:

Stash Driver Configuration

Each driver comes with a set of default options which can be individually overridden.


All versions of stash-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7 || ^8
tedivm/stash Version >=0.15
symfony/config Version ^3.4 || ^4.0 || ^5.0
symfony/http-kernel Version ^3.4 || ^4.0 || ^5.0
symfony/dependency-injection Version ^3.4 || ^4.0 || ^5.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 tedivm/stash-bundle contains the following files

Loading the files please wait ....