Download the PHP package emileperron/magic-cache without Composer

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

MagicCache: a simple PHP caching library

MagicCache is a simple caching library that wraps Symfony's FilesystemAdapter in order to give you the simplest caching experience possible.

If you have a small project that requires caching, or have a large project with very simple caching needs, this library is for you.

The highlight of this library are the Cache::magicGet() and Cache::magicSet() method, which allow you to save or retrieve data from the cache without having to define unique cache keys yourself. More details on that below.

Getting started

To get started, simply require the package via Composer:

Once that's done, you can start using the library in your project. Here's a very brief overview of the library's usage and functionalities:

Magic get() and set() methods

This library defines two magic methods: magicGet() and magicSet(). These methods automatically generate a cache key based on the calling function's class, name and parameters.

This won't always be usable (ex.: if you are passing entire files or data stream in your function's parameters), but it works for a lot of simple use cases, which are much more common anyway.

Both methods accept a $suffixes parameter, which allow you to pass your own unique identifier(s) in the form of an array. Those suffixes will then be used instead of the calling function's parameters. The calling function's class and name will still be used in order to generate a unique cache key for that specific method.

Contributing

Feel free to submit pull requests on the GitHub repository if you want to add functionalities or suggest improvements to this library. I will look them over and merge them as soon as possible.

You can also submit issues if you run into problems but don't have time to implement a fix.

Supporting

Finally, if you use the library and would like to support me, here are the ways you can do that:


All versions of magic-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
symfony/cache Version ^5.1
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 emileperron/magic-cache contains the following files

Loading the files please wait ....