Download the PHP package mk4u/cache without Composer

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

Mk4U\Cache

GitHub Release GitHub code size in bytes GitHub License

A simple and flexible cache system for PHP.

Features

[!IMPORTANT] The file driver Mk4U\Cache\Drivers\File is suitable for storing small amounts of data in cache. However, as the number of records increases, performance may be affected due to the latency of disk I/O operations.

For applications that require storing large volumes of data or high performance, it is recommended to consider using in-memory cache drivers, such as APCu, which are designed to handle large amounts of data more efficiently.

Requirements

Installation

Usage.

Configuration

To use the library, you must first create an instance of the cache driver you want to use. The library includes a Mk4U\Cache\CacheFactory that makes it easy to create instances of the cache drivers.

[!TIP] If no parameters are passed to the Mk4U\Cache\CacheFactory::create(), an object of type Mk4U\Cache\Drivers\File will be created by default.

[!NOTE] By default the Mk4U\Cache\Drivers\File object sets the following configuration parameters:

Example of use with the Mk4U\Cache\Drivers\File driver

[!IMPORTANT] Make sure you set the necessary permissions for the creation of directories and cache files.

Example of use with Mk4U\Cache\Drivers\Apcu driver

Mk4U\Cache\Drivers\Apcu has only one configurable parameter and it is ttl, by default its value is 300 seconds (5 minutes).

Available methods

The cache class implements the following methods of the CacheInterface interface:

Example of use of the methods

Storing a value in the cache
Retrieve a value from the cache
Remove a value from the cache
Checks if a value exists in the cache by its key
Clear the entire cache
Handling multiple values

You can store, retrieve and delete multiple values from the cache using the setMultiple, getMultiple and deleteMultiple methods.

Storing multiple values
Retrieve multiple values
Delete multiple values

Exceptions

The library throws the following exceptions:

Contributions

Contributions are welcome. If you wish to contribute, please open an issue or a pull request in the repository.

License

This project is licensed under the MIT License.

Contact

If you have any questions or comments, feel free to contact me at http://t.me/alexsadrov16


All versions of cache with dependencies

PHP Build Version
Package Version
Requires 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 mk4u/cache contains the following files

Loading the files please wait ....