j6s/flow-apcu-with-fallback

Package that provides an APCu cache backend that falls back to a given fallback if the APCu extension is not installed.

Installs: 19 581

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:neos-package

2.0.0 2021-01-31 16:25 UTC

This package is auto-updated.

Last update: 2024-03-29 04:19:18 UTC


README

This package provides a small wrapper around flows default ApcuBackend which falls back to a given other backend, if the apcu PHP extension is not installed.

Installation

$ composer require j6s/flow-apcu-fallback-cache

Configuration

Neos_Fusion_Content:
  frontend: Neos\Cache\Frontend\StringFrontend
  backend: J6s\ApcuFallbackCache\Backend
  backendOptions:
    fallback:
      backend: Neos\Cache\Backend\PdoBackend
      backendOptions:
        dataSourceName: 'sqlite:%FLOW_PATH_DATA%/Temporary/Neos_Fusion_Content.sqlite'

Why not use MultiBackend?

Flow already ships with a MultiBackend that will initialize multiple cache backend and use the first that does not throw an error. In theory this backend functions very similarly to the backend provided in this package, however it will always initialize all backends, leading to slower response times since the Initialization to the PdoBackend (used in example above) tends to take about 100ms.