Download the PHP package trevorpe/laravel-symfony-cache without Composer

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

Test

laravel-symfony-cache

Use the Symfony Cache Component with Laravel's cache system. Heavily inspired by the alternative-laravel-cache project.

[!CAUTION] Symfony's Cache component behaves differently than Laravel's.

Read the Clear Behavior sections before replacing the default Laravel cache stores with this library, and consider how a different tag behavior could affect any other libraries that you use.

Requirements

Installation

Usage

This library introduces a new cache driver registered with Laravel's CacheManager.

You can use a Symfony cache adapter by specifying symfony as your cache driver alongside an adapter property, with the fully-qualified class name of the Symfony cache adapter you'd like to use.

Configuration Examples

Array

Filesystem

Filesystem (Tagged)

Redis

Redis (Tagged)

Tag Behavior

Similar to alternative-laravel-cache, this library brings an alternate tag behavior than Laravel's default cache.

Symfony's cache system does not treat tags as hierarchical like Laravel's cache system does. Instead, tagging a cache entry with one or more tags allows you to invalidate a group of entries all at once by referencing its tag. In addition, each tag is applied individually, rather than as an ordered list. (E.g. applying two tags and calling flush() with either of those tags will invalidate the entry.)

This means that tagging is only really useful when writing or removing data. Reading tagged data will function identically to getting a cache entry by its key without tags.

Examples

Clear Behavior

The clear() method of Laravel will clear the entire cache when using Redis as the driver (and possibly others).

With Symfony's cache system, clear() will only clear keys matching the prefix and namespace. This is a bit less dangerous, but one should be still be cautious when clearing a cache store to ensure you are only deleting the intended values.


All versions of laravel-symfony-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
laravel/framework Version ^10.0 || ^11.0
symfony/cache Version ^6.0 || ^7.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 trevorpe/laravel-symfony-cache contains the following files

Loading the files please wait ....