Download the PHP package bedrockstreaming/stale-cache-bundle without Composer

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

Bedrock Stale cache Bundle

Introduction

This bundle aims to provide a stale cache feature to the symfony/cache component. Basically, it does the following steps:

  1. extending the lifetime of cache items with a "stale period"
  2. during the stale period, if a cache item is fetched, try to regenerate it
  3. if the regeneration fails with a specifically marked error, give back the initially cached value

Usage

Configuration

First, you should configure each stale cache service:

It will declare a @stale_cache_service_id, that you can use as an injected dependency. The stale service will implement Symfony\Contracts\Cache\CacheInterface, so you'll need to use the get method to fetch cache items. You can use Symfony\Contracts\Cache\TagAwareCacheInterface if you need tagging capabilities.

It's not compatible with the old Symfony\Component\Cache\Adapter\AdapterInterface.

Allow stale cache for some errors

To use stale cache, you'll have to implement Bedrock\StaleCacheBundle\Exception\UnavailableResourceException on a custom, thrown error. The method allowStaleCacheUsage can be used for some custom logic, or you can hard code a return true.

Events

A Bedrock\StaleCacheBundle\Event\StaleCacheUsage event is sent on stale cache usage. It is strongly advised to log it, with the associated error.

Logs

Debug logs can be enabled to ensure correct stale cache usage. It should not be enabled in a production environment since it can cause performance issue.

Contribute

You can execute make quality test to execute quality checks and tests. There is also a few make targets that can help you check this bundle is correctly supported on every Symfony versions


All versions of stale-cache-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
psr/event-dispatcher Version ^1.0
psr/log Version ^1 || ^2 || ^3
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
symfony/cache-contracts Version ^2.0 || ^3.0
symfony/cache Version ^5.4 || ^6.0
symfony/config Version ^5.4 || ^6.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 bedrockstreaming/stale-cache-bundle contains the following files

Loading the files please wait ....