Download the PHP package llegaz/redis-cache without Composer

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

Redis Cache

This project is build upon my first redis open PHP project Redis Adapter. Thanks to it you can use either Predis client or native PHP Redis client in a transparent way.

This implementation is quite safe and rely totally on RESP (REdis Serialization Protocol), implemented by Predis and the Redis PHP extension, through their standard API.

PSR divergences

For now some of the reserved charachters ()/@: for the keys are supported entirely, it is an on purpose choice we made because PSR reserved those characters years ago and did nothing concrete with it, or nothing I have heard of. Moreover there are some real life example where those characters are cool to have (emails, urls, paths, and even redis proposed key format which is considered a good practise, e.g user:123). Finally, as there are no security constraints not to use those characters we made the choice not to follow PSR on this point and to support those chars ()/@: and we hope it will be well tolerated by the PHP developpers community. A contrario we decided to not enable withespaces in keys to ease debugging and because it is not a redis standard (std_key:preferred:form) nor in URL RFC definition. And so we thought it as not a good practice, at least, for our use cases. But thoses choices are not engraved in marble and are totally still on the table to discussion.

Install

If PHP redis is installed

These implementations will use it or fallback on Predis client otherwise.

You can simply use composer to install this library:

PSR-6

PSR-6 implementation is my implementation of Caching Interface from the PHP FIG www.php-fig.org/psr/psr-6 It is far from perfect and as of now (first versions of this implementation) you should be aware that pool expiration are available but by pool's fields expiration are not really ! I will try to test and implement a pool key expiration for Valkey.io in a near future but my first draft is: if you expire a pool key it will expire your entire pool SO BE EXTRA CAUTIOUS WITH THAT !

Caution

if you expire a pool key it will expire your entire pool SO BE EXTRA CAUTIOUS WITH THAT !

Basic usage

Of course you should do cleaner, proper implementation, the below example is not production ready, it is simplified and given ONLY for the sake of example !

Batch

PSR-16

My Simple Cache implementation PHP FIG PSR-16 www.php-fig.org/psr/psr-16

Configuration

is equivalent to

or

Persistent connection

Contributing

We welcome contributions! This project follows Git Flow workflow.

Quick Start

For complete guidelines, see CONTRIBUTING.md which covers:

Development Commands

CI/CD Status

CI codecov

Automated testing on:

All Pull Requests are automatically tested before merge.

View test results →

RedisCache

CI PHP Redis Coverage License

Redis-native PSR-16/PSR-6 for mature developers

Stay tuned, by following me on github, for new features using predis and PHP Redis.


@See you space cowboy... 🚀


All versions of redis-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
llegaz/redis-adapter Version ~0.1
psr/cache Version ^3.0
psr/simple-cache Version ^3.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 llegaz/redis-cache contains the following files

Loading the files please wait ...