Download the PHP package lingualeo/php-cache without Composer

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

php-cache

PHP-Cache is a library designed to simplify your work with the different cache storage engines. Currently library is under heavy development so API can change in the future.

Example using Redis:

Also atomic CAS-like operations supported (create and update). For example:

Data represents the reference to information that storage already contains. You can modify or completly replace it inside the callable.

If other client will change Data before you call create you will get an AtomicViolationException. In your client code you can catch this exception and retry operation.

The main difference betweeen create and update methods is that update will do nothing in case storage doesn't contains the specified key.

Decorators

Currently library provides only one additional HotCacheDecorator which is very useful in a highloaded environment: it simply stores (and modifies) all cached data in a in-memory array. So if you call get once then all subsequent calls will be served only by hot cache without any requests to storage server.

To enable hot cache just wrap your creation of any CacheProvider object with the decorator:

Cache key generation

Library provides simple mechanism to generate cache keys with generateCacheKey method of CacheProvider:

You can pass any number of arguments (> 0) to this method in order to get a fresh shiny cache key. Also as the first parameter you can pass some class name and if this class will contain constant field VERSION then it's value will be mixed up with other arguments of generateCacheKey:

This behavior is very useful when you work with ORM models and want to cache different versions of objects without need to drop all cache data after making some changes in a small single model.

Testing

Setup Vagrant and Virtualbox.


All versions of php-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 lingualeo/php-cache contains the following files

Loading the files please wait ....