Download the PHP package maplephp/cache without Composer

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

MaplePHP - Cache

MaplePHP Cache, a clean and user-friendly caching library. MaplePHP Cache is designed to provide a seamless caching experience with simplicity and ease of use as its core principles. Whether you're familiar with PSR-6 or PSR-16, this library offers a smooth and intuitive caching solution for your PHP applications.

Installation

Initiate the cache engine

Start with initiate the MaplePHP Cache class and pass on a Handler to it.

Usage

It is super easy to use

Error handling

While not required, it is advisable to handle critical throwable errors that may occur, such as an invalid cache key, insufficient file permissions, or possible connection issues with a cache server. Logging these exceptions can be beneficial for error tracking and troubleshooting purposes.

Handlers

File system

Save cache as a file on you system.

Arg1: (string) Path to directory where you want to save the cache fiels

Memcached

Use Memcached to save cache in memory (high performance)

Arg1: (string|array) Host to server (or get default with class constant "MemcachedHandler::HOST")

Arg2: (int|null) Port to server (or get default with class constant "MemcachedHandler::PORT")

Arg3: (int) Weight to server (Arg is default 0 but you can also set it with default with class constant "MemcachedHandler::WEIGHT")

Command list (PSR-16)

Get a cache item

Can return mixed values if successful if miss then return default value. The default value is not required and is by default null.

Check if cache item exists

Will return bool

Set a cache item

It is allowed to set cache values of mixed types like strings, arrays and including PSR-7: HTTP Streams. Will return bool.

Delete a cache item

Will return bool

Clear and auto delete all cache items

Will return bool

Get multiple cache items

Will return array with mixed values if successful, if miss then return default value. The default value is not required and is by default null.

Set multiple cache items

Will return bool

Delete multiple cache items

Will return bool

PSR-6 Example

If your application needs advanced caching features, hierarchical caching, or cache tagging, PSR-6 is a more suitable choice.


All versions of cache with dependencies

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

Loading the files please wait ....