Download the PHP package spiritix/lada-cache without Composer

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

Lada Cache

A Redis based, fully automated and scalable database cache layer for Laravel

Build Status Code Climate Total Downloads Latest Stable Version Latest Unstable Version License

Contributors wanted! Have a look at the open issues and send me an email if you are interested in a quick introduction via Hangouts.

Table of Contents

For further information on how this library works and how to debug it please have a look at the Wiki.

Features

Version Compatibility

Laravel PHP Lada Cache
5.1-5.6 5.6.4+ 2.x
5.7-5.8 7.1+ 3.x
6.x 7.2+ 4.x
7.x 7.2+ 5.x
8.x 7.3+ 5.x
9.x 8.0+ 5.x

Performance

The performance gain achieved by using Lada Cache varies between 5% and 95%. It heavily depends on the quantity and complexity of your queries. The more (redundant) queries per request your application fires and the more complex they are, the bigger the performance gain will be. Another important factor to consider is the amount of data returned by your queries, if a query returns 500MB of data, Lada Cache won't make it faster at all. Based on experience, the performance gain in a typical Laravel web application is around 10-30%.

Other than the performance gain, an essential reason to use Lada Cache is the reduced the load on the database servers. Depending on your infrastructure, this may result in reasonable lower cost and introduce new possibilities to scale up your application.

Why?

A lot of web applications make heavy use of the database. Especially using an ORM like Eloquent, queries repeat often and are not always very efficient. One of the most common solutions for this problem is caching the database queries.

Most RDBMS provide internal cache layers (for example Mysql Query Cache). Unfortunately, these caching systems have some very serious limitations:

Laravel, on the other hand, provides the possibility to cache particular queries manually. The problem is that it doesn't invalidate the cached queries automatically, you'll need to let them expire after a certain time or invalidate them manually on all places where the affected data might be changed.

This library provides a solution for all of the mentioned problems. Install, scale up and lean back.

Why only Redis?

As you may have discovered while looking at the source code, this library is built directly on top of Laravel Redis instead of Laravel Cache, which would make more sense from a general point of view. However, there are several important reasons behind this decision:

If you still want to use another storage backend, please feel free to contribute.

Requirements

Installation

Lada Cache can be installed via Composer by requiring the spiritix/lada-cache package in your project's composer.json. Or simply run this command:

The Lada Cache service provider will automatically be installed using Package Discovery.

Finally, all your models must include the Spiritix\LadaCache\Database\LadaCacheTrait trait. It's a good practice to create a base model class which includes the trait and then gets extended by all your models.

Don't try to only have specific models including the Lada Cache trait, it will result in unexpected behavior. In the configuration, you will find the possibility to include or exclude specific models.

Configuration

Use the following command to publish the lada-cache.phpconfig file to your configuration folder:

Console commands

You may truncate the cache by running the following command:

If you want to temporarily disable the cache (for example before running migrations), use these commands:

`

Known issues and limitations

Contributing

Contributions in any form are welcome. Please consider the following guidelines before submitting pull requests:

License

Lada Cache is free software distributed under the terms of the MIT license.


All versions of lada-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/database Version ^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/redis Version ^7.0|^8.0|^9.0|^10.0|^11.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 spiritix/lada-cache contains the following files

Loading the files please wait ....