Download the PHP package storefrontbvba/zend-cache-redis without Composer

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

Zend_Cache backend using Redis with full support for tags

This Zend_Cache backend allows you to use a Redis server as a central cache storage. Tags are fully supported without the use of TwoLevels cache so this backend is great for use on a single machine or in a cluster. Works with any Zend Framework project!

FEATURES

High Availability and Load Balancing Support

There are two supported methods of achieving High Availability and Load Balancing with Cm_Cache_Backend_Redis.

Redis Sentinel

You may achieve high availability and load balancing using Redis Sentinel. To enable use of Redis Sentinel the server specified should be a comma-separated list of Sentinel servers and the sentinel_master option should be specified to indicate the name of the sentinel master set (e.g. 'mymaster'). If using sentinel_master you may also specify load_from_slaves in which case a random slave will be chosen for performing reads in order to load balance across multiple Redis instances. Using the value '1' indicates to only load from slaves and '2' to include the master in the random read slave selection.

Example configuration:

    <!-- This is a child node of config/global -->
    <cache>
      <backend>Cm_Cache_Backend_Redis</backend>
      <backend_options>
        <server>tcp://10.0.0.1:26379,tcp://10.0.0.2:26379,tcp://10.0.0.3:26379</server>
        <timeout>0.5</timeout>
        <sentinel_master>mymaster</sentinel_master>
        <sentinel_master_verify>1</sentinel_master_verify>
        <load_from_slaves>1</load_from_slaves>
      </backend_options>
    </cache>

Load Balancer or Service Discovery

It is also possible to achieve high availability by using other methods where you can specify separate connection addresses for the master and slave(s). The load_from_slave option has been added for this purpose and this option does not connect to a Sentinel server as the example above, although you probably would benefit from still having a Sentinel setup purely for the easier replication and failover.

Examples would be to use a TCP load balancer (e.g. HAProxy) with separate ports for master and slaves, or a DNS-based system that uses service discovery health checks to expose master and slaves via different DNS names.

Example configuration:

    <!-- This is a child node of config/global -->
    <cache>
      <backend>Cm_Cache_Backend_Redis</backend>
      <backend_options>
        <server>tcp://redis-master:6379</server>
        <load_from_slave>tcp://redis-slaves:6379</load_from_slave>
        <master_write_only>0</master_write_only>  <!-- Use 1 to prevent reads from master -->
        <timeout>0.5</timeout>
      </backend_options>
    </cache>

Static Configuration

You may also statically specify the master and slave servers by passing either an array to load_from_slave or a string with multiple addresses separated by a comma.

    <!-- This is a child node of config/global -->
    <cache>
      <backend>Cm_Cache_Backend_Redis</backend>
      <backend_options>
        <server>tcp://redis-master:6379</server>
        <load_from_slave>tcp://redis-slave1:6379,tcp://redis-slave2:6379</load_from_slave>
        <master_write_only>0</master_write_only>  <!-- Use 1 to prevent reads from master -->
        <timeout>0.5</timeout>
      </backend_options>
    </cache>

ElastiCache

The following example configuration lets you use ElastiCache Redis (cluster mode disabled) where the writes are sent to the Primary node and reads are sent to the replicas. This lets you distribute the read traffic between the different nodes.

The instructions to find the primary and read replica endpoints are here.

    <!-- This is a child node of config/global/cache -->
    <backend_options>
      <server>primary-endpoint.0001.euw1.cache.amazonaws.com</server>
      <port>6379</port>
      <database>0</database>                    <!-- Make sure database is 0 -->
      <master_write_only>1</master_write_only>
      <load_from_slave>
        <node-001>
          <server>replica-endpoint-1.jwbaun.0001.euw1.cache.amazonaws.com</server>
          <port>6379</port>
        </node-001>
        <node-002>
          <server>replica-endpoint-2.jwbaun.0001.euw1.cache.amazonaws.com</server>
          <port>6379</port>
        </node-002>
      </load_from_slave>
    </backend_options>

DEPRECATION NOTICE

Previously the ElastiCache config instructions suggested setting up a <cluster> node but this functionality was flawed and is no longer supported. The config is still parsed and loaded for backwards-compatibility but chooses a random slave to read from rather than using md5 hash of the keys.

RELATED / TUNING

Release Notes


All versions of zend-cache-redis with dependencies

PHP Build Version
Package Version
Requires colinmollenhour/credis Version *
zf1/zend-cache 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 storefrontbvba/zend-cache-redis contains the following files

Loading the files please wait ....