Download the PHP package userfrosting/cache without Composer

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

Cache module for UserFrosting 4

Latest Version Join the chat at https://chat.userfrosting.com/channel/support Donate

Branch Build Coverage Style
master
develop  

Louis Charette, 2017

Wrapper function for Laravel cache system for easier integration of the cache system in standalone projects. Refer to Laravel documentation for all cache related function. This wrapper support Laravel ArrayStore, FileStore, MemcachedStore and RedisStore.

Also include a namespace parameter to handle multiple cache instance on the same server or project.

Usage

For any store driver, you first need to create a new *Store, passing the config values for each of those stores. Once a new store instantiated, you need to use the instance function to get the cache instance.

To use one of the following stores, you first need to include add it to the use list of your class or php file.

If you need to use multiple cache instance on the same server (especially for Memcached and Redis drivers) or on the same project (for example, user based cache), you can use the namespace parameter in the *Store constructor. A namespace should always be a string.

Since he Laravel cache requires an instance of Illuminate\Container\Container, every *Store in this package will create one automatically. If you want to reuse an existing Container, you can pass it to the *Store constructor.

While the namespace parameter is required for any *Store, all other parameters are optional, unless otherwise specified.

ArrayStore

The ArrayStore is a dummy store that doesn't really save anything. This can be used if you want to disable cache globally.

The ArrayStore accepts the namespace and Container parameters: new ArrayStore(string $namespace, Illuminate\Container\Container $app = null);

Example :

FileStore

The FileStore save file to the filesystem.

The FileStore accepts the namespace, path and Container parameters : new FileStore(string $namespace, string $path = "./", Illuminate\Container\Container $app = null);

Example :

MemcachedStore

The MemcachedStore uses Memcached to efficiently handle caching.

Memcached should't be mistaken for the Memcache. Those are tow separate things !

The MemcachedStore accepts the namespace, config and Container parameters : new MemcachedStore(string $namespace, array $config = [], Illuminate\Container\Container $app = null);

Memcached config's array contain the settings for your Memcached instance. Default values are:

Custom config can be overwritten using this parameter.

Example :

Example with custom server and port :

RedisStore

The RedisStore uses Redis server to efficiently handle caching.

The RedisStore accepts the namespace, config and Container parameters : new RedisStore(string $namespace, array $config = [], Illuminate\Container\Container $app = null);

Redis config's array contain the settings for your Redis server. Default values are:

Custom config can be overwritten using this parameter.

Example :

Example with custom port and password :

Style Guide

Testing


All versions of cache with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
illuminate/cache Version ^5.8
illuminate/filesystem Version ^5.8
illuminate/container Version ^5.8
illuminate/config Version ^5.8
illuminate/redis Version ^5.8
predis/predis Version ~1.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 userfrosting/cache contains the following files

Loading the files please wait ....