Download the PHP package weakbit/fallback-cache without Composer

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

What does it do?

In simple words - it makes your Website reachable still if your cache does not work. Think about a network issue on the provider side where your Redis Cluster should be reachable. Or someone updates your SQL Cluster, configured for the TYPO3 Instance and did not tell you! Also, the fallback cache ensures components to be still cached, to reduce system load.

In addition, the Cache itself has a new Interface it can implement and tell this Extension it went bad:

After the fallback period the cache on the primary system is outdated and has to be cleared!

Recommendation

It is recommended to set

in additional.php or the equivalent settings.php file.

This ensures the override is applied early and reliably, avoiding issues with loading order or race conditions that can occur if set in extension files like ext_localconf.php.

Example

This defines a pages cache with the fallback cache: pages_fallback.

To catch exceptions a variable frontend is set that sents a event with status yellow on exception.

You can chain them and also define a fallback for the fallback cache.

You could end the chain with a cache with the NullBackend, if that also fails the hope for this TYPO3 request is lost. But using no cache may bring down your server, but that depends on the server and application.

Yellow Status Rate

The custom VariableFrontend emits a YELLOW status when cache read/write operations fail at runtime. By default, YELLOW does not switch to the fallback cache because the primary cache may recover.

Set yellow_to_red_rate on a cache configuration to promote YELLOW events to RED when a rate is exceeded:

With this example, ten YELLOW events for pages are tolerated per minute. The next YELLOW event inside the same minute is stored as RED. Once the status is RED, the cache manager uses the configured fallback cache. A GREEN status resets the limiter.

Supported formats include:

Status Cache Backend

Use a high-speed backend for weakbit__fallback_cache, for example Redis or another low-latency cache. This cache stores only small status and counter payloads, but it may see many read/write operations while cache backends are unstable.

Immutable Cache Configuration

This extension provides the ability to mark certain caches as "immutable", which means they will not be affected by cache flushing operations. This is particularly useful for caches that contain data that rarely changes and is expensive to regenerate.

⚠️ WARNING: Immutable caches must be manually managed by developers. The system will NOT automatically clear these caches during regular maintenance operations!

How to Configure Immutable Caches

To mark a cache as immutable, add the tags configuration with the immutable property set to true:

Behavior of Immutable Caches

When a cache is marked as immutable:

  1. It will not be cleared when flushCaches() is called
  2. It will not be cleared when flushCachesByTag() is called with any tags
  3. It will not be cleared when flushCachesInGroup() is called, even if the cache belongs to that group

This feature ensures that important cache entries remain available even during maintenance operations or when other parts of the system trigger cache flushes.

How to Access the Cache Status

  1. Log in to your TYPO3 backend
  2. Look at the top toolbar (the black bar at the top of the screen)
  3. Find the system information icon (typically shows system details like TYPO3 version)
  4. Click on this icon to see a dropdown menu
  5. The cache status will be displayed

Credits

Inspired by https://packagist.org/packages/b13/graceful-cache


All versions of fallback-cache with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
symfony/polyfill-php83 Version ^1.31
symfony/rate-limiter Version ^7.4
typo3/cms-core Version ~13.4.0 || ~14.3.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 weakbit/fallback-cache contains the following files

Loading the files please wait ...