Download the PHP package picamator/cachemanager without Composer

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

CacheManager

PHP 7 ready Latest Stable Version License SensioLabsInsight

Master

Build Status StyleCI Coverage Status

Dev

Build Status StyleCI Coverage Status

CacheManager is an application providing wrapper over 3-rd party cache libraries optimizing for saving RESTful API's or SQL search results.

The general approach to save search response is based on building cache key as a hash of search query. But that is not working well for two slightly different queries. Moreover it's failed to combine data from cache and server. CacheManager solves those problems for special cases like searching entities by it's ids.

Cache libraries

CacheManager does not implement any default cache library neither own one. Instead CacheManager asks objects to implement PSR-6. Having that with Symfony DI and PSR-6 Adapters makes possible to use any cache library without limitation.

Requirements

Installation

  1. Update to your composer.json

  2. Run composer install --no-dev

Specification

RESTful API

Assume application works with RESTful API, where:

Each of the samples below shows pair of API requests.

Sample 1

  1. GET: customer\?query="id IN(1,2,3)&fields='name,address'"
  2. GET: customer\?query="id IN(1,2)&fields='name'"

The second request SHOULD use cache because it has information about customer with id 1 and 2.

Sample 2

  1. GET: customer\?query="id IN(1,2,3)&fields='name'"
  2. GET: customer\?query="id IN(1,2)&fields='name,address'"

The second request SHOULD NOT use cache because it asks more information about customer that was saved in the cache. Therefore after server data was obtained it SHOULD be saved to cache overriding the previously saved data.

Sample 3

  1. GET: customer\?query="id IN(1,2,3)&fields='name,address'"
  2. GET: customer\?query="id IN(3,4)&fields='name'"

The second query SHOULD use cache for customer with id 3 and application SHOULD ask server only information about id 4.

SQL

Let's application use MySQL with:

Each of the samples below shows pair of SQL queries. SQL samples SHOULD behavior similar to corresponding RESTful API samples.

Sample 1

  1. SELECT name, address FROM customer WHERE id IN(1,2,3)
  2. SELECT name FROM customer WHERE id IN(1,2)

Sample 2

  1. SELECT name FROM customer WHERE id IN(1,2,3)
  2. SELECT name, address FROM customer WHERE id IN(1,2)

Sample 3

  1. SELECT name, address FROM customer WHERE id IN(1,2,3)
  2. SELECT name FROM customer WHERE id IN(3,4)

Usage

CacheManager has two different Facade classes:

  1. CacheManager - provides base operation over cache
  2. CacheManagerSubject - makes extending CacheManager with events

It's up to application to use what kind of extensibility is needed. If it's not need to use events then CacheManager Facade is a best choose.

Here is a steps to use CacheManager:

  1. Choose your cache library with PSR-6 compatible adapter
  2. Instantiate dependencies for CacheManager Facades using DI
  3. Create CacheManager or CacheManagerSubject
  4. Prepare SearchCriteriaBuilder
  5. Apply operation on CacheManager Facades
  6. Handle result

Generally the steps 1-3 executes only once during application bootstrap but 4-6 are executed several times as needed.

Memcached

MemcachedManager is an example to use CacheManager with Memcached.

Other cache libraries

To use CacheManager with arbitrary Cache library it's need:

  1. Implement PSR-6 interface Psr\Cache\CacheItemPoolInterface over your library
  2. or choose one from existing adapters php-cache
  3. Choose between CacheManager and CacheManagerSubject

There is illustrative code bellow shows how to make cache search with CacheManagerSubject. Please use DI library to build dependencies in real application.

API&SPI

API

API includes:

SPI

SPI includes:

Documentation

Developing

To configure developing environment please:

  1. Follow install and run Docker container
  2. Run inside project root in the Docker container composer install

IDE style configuration

Please make sure that your IDE has imported .editorconfig. For more information please visit http://editorconfig.org/.

Backward compatibility

Please follow steps bellow to keep Backward compatibility:

Backward compatibility validation

To check backward compatibility please run integration tests in MemcachedManager.

Contribution

If you find this project worth to use please add a star. Follow changes to see all activities. And if you see room for improvement, proposals please feel free to create an issue or send pull request. Here is a great guide to start contributing.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project and its community you agree to abide by those terms.

License

CacheManager is licensed under the MIT License. Please see the LICENSE file for details.


All versions of cachemanager with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
psr/cache Version ~1.0
cache/adapter-common Version ^0.3
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 picamator/cachemanager contains the following files

Loading the files please wait ....