Download the PHP package mis3085/laravel-cache-label without Composer

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

An alternative method of categorizing cached items in Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package is a complementary use of Laravel Cache, developed based on the syntax of Cache Tag.

Cache Tag creates separate namespaces for different tag combinations to store cache items. A cache item named FOOBAR can exist in different tag namespaces and have different values.

Cache Label only establishes the reference relationship between labels and cache items. A cache item named FOOBAR will be the only item in the entire cache store.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Usage

Storing labeled cache items

Accessing labeled cache items

The following statements return the same value.

The cache key must exist in each label, otherwise the empty or default value will be returned.

Flushing labeled cache items

Clear the value of items associated with the labels, but still remember the cache keys for further use.

Resetting labels

Let the label no longer track any cache items, but does not clear the values of its previous associated cache items.

Calling forget() with labels()

When forget() is called with labels(), the value of the cache item is cleared, but the label does not forget the key of the cache item. This behavior can be changed by modifying config('cache-label.forget_and_remove'). When set to true, the label will forget the cache key after its value has been cleared.

By default

Setting config('cache-label.forget_and_remove') to true

Calling flush() with labels()

When flush() is called, all items in the entire cache store will be flushed, regardless of whether labels() is used or not. This behavior can be changed by modifying config('cache-label.flush_behavior'). However, this is not recommended, and it is better to use flushLabels() or resetLabels() to manipulate the labeled items.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-cache-label with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version ^8.0|^9.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 mis3085/laravel-cache-label contains the following files

Loading the files please wait ...