Download the PHP package adamcrampton/object-cache without Composer

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

object-cache

This Laravel package will allow you to set and forget objects in your Redis cache, with automated Middleware and convenient pre-bundled TTL settings. All you need to supply is a TTL, key name, and method for regenerating the value.

Upgrading from v3.x.x

If upgrading from v3, you will need to make the following changes to your implementation:

Installation

Configuration

Configuration can be found in the published file.

Usage

To initialise a connection:

Once initialised, you can use all Predis commands. See:

Middleware

The CheckObjectCache Middleware that ships with the package allows you to add cache objects to be automatically checked on each request, and if missing, set. You will need to add an array (configuration) and each corresponding method to your cache store class (mentioned above in installation).

An array of 3 values are required for each item in the array. They are:

An example of an implementation using a cache store class:

Get Helper

Once initialised, you can fetch an object from the cache using the provided helper. The two parameters you need to pass in are the key and JSON decode option.

If you are passing in the decode option, set this to 'array' or 'object' for the correct return format. Example:

Pre-configured TTL

A convenience array of TTL values are included with the package. To use one of the values, initalise the Redis connection as mentioned above, and call the property with the appropriate key name. Structure of this TTL array is as follows:

```$this->ttl = [ 'default' => [ 'default' => 86400 ], 'apc' => [ 'default' => 86400 ], 'array' => [ 'default' => 86400 ], 'database' => [ 'default' => 86400 ], 'file' => [ 'default' => 86400 ], 'memcached' => [ 'default' => 86400 ], 'redis' => [ 'default' => 86400 ], 'minutes' => [ 'one' => 60, 'five' => 300, 'ten' => 600, 'fifteen' => 900, 'twenty' => 1200, 'thirty' => 1800, 'forty' => 2400, 'fortyFive' => 2700, 'fifty' => 3000, 'sixty' => 3600 ], 'hours' => [ 'one' => 3600, 'two' => 7200, 'three' => 10800, 'four' => 14400, 'five' => 18000, 'six' => 21600, 'seven' => 25200, 'eight' => 28800, 'nine' => 32400, 'ten' => 36000, 'eleven' => 39600, 'twelve' => 43200, 'twentyFour' => 86400 ], 'days' => [ 'one' => 86400, 'two' => 172800, 'three' => 259200, 'four' => 345600, 'five' => 432000, 'six' => 518400, 'seven' => 604800, 'fourteen' => 1209600, 'twentyEight' => 2419200 ], 'weeks' => [ 'one' => 604800, 'two' => 1209600, 'three' => 1814400, 'four' => 2419200, 'five' => 3024000, 'six' => 3628800 ] ];


All versions of object-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=7
laravel/framework Version >=5.8
predis/predis Version ^1.1
illuminate/support Version >=5.5
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 adamcrampton/object-cache contains the following files

Loading the files please wait ....