PHPackages                             weakbit/lucene-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. weakbit/lucene-cache

ActiveTypo3-cms-extension[Caching](/categories/caching)

weakbit/lucene-cache
====================

Provides a cache backend for TYPO3 that stores all cache information in Lucene

4.0.0(1mo ago)06.4k↓50%1GPL-2.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Jan 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/andersundsehr/lucene-cache)[ Packagist](https://packagist.org/packages/weakbit/lucene-cache)[ RSS](/packages/weakbit-lucene-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (16)Versions (16)Used By (0)

Use Lucene as Cache Backend for your TYPO3 projects
===================================================

[](#use-lucene-as-cache-backend-for-your-typo3-projects)

[![CI](https://github.com/andersundsehr/lucene-cache/actions/workflows/tasks.yml/badge.svg)](https://github.com/andersundsehr/lucene-cache/actions/workflows/tasks.yml)[![codecov](https://camo.githubusercontent.com/6e46b4862493dfd70fa446bffd070c51010cf88d58e2be16802a0080effb4054/68747470733a2f2f636f6465636f762e696f2f67682f616e64657273756e64736568722f6c7563656e652d63616368652f67726170682f62616467652e737667)](https://codecov.io/gh/andersundsehr/lucene-cache)

Provides a cache backend for TYPO3 that stores all cache information in Lucene index.

Key Features of lucene-cache for TYPO3
--------------------------------------

[](#key-features-of-lucene-cache-for-typo3)

- Efficient Caching: Uses Lucene's indexing and search capabilities to store and retrieve cached content quickly.
- Scalability: Can handle large volumes of data and perform well under high load, making it suitable for large TYPO3 installations.
- Flexibility: Provides flexible configuration options to tailor the caching behavior to specific needs.
- Integration: Seamlessly integrates with TYPO3's caching framework, allowing for easy setup and use within TYPO3 projects.

Installation and Configuration
------------------------------

[](#installation-and-configuration)

To use the lucene-cache backend in your TYPO3 project, follow these steps:

### Install the Extension

[](#install-the-extension)

You can install the lucene-cache extension via Composer:

```
composer require andersundsehr/lucene-cache
```

### Example Configuration for the Cache

[](#example-configuration-for-the-cache)

```
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages'] = [
    'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
    'backend' => \Weakbit\LuceneCache\Cache\Backend\LuceneCacheBackend::class,
    'options' => [
        'defaultLifetime' => 604800,
        'maxBufferedDocs' => 1000,
        'compression' => true,
        'compressionAlgorithm' => 'zstd', // optional: auto-detects if not set
        'compressionMinSize' => 256,      // optional: skip compression for small data
    ],
    'groups' => [
      'pages',
    ]
];
```

The Option "indexName" must not contain other than the following chars: *a-zA-Z0-9-\_*

### Performance

[](#performance)

The issue to develop that cache was a usage of very many cache tags.

maxBufferedDocs is set to 1000 here, that means that up to 1000 documents are buffered before to write, that is good for large imports if you have some spare ram. Meanwhile, that caching information is not available to other PHP processes.

Keep in mind that some operations (flushes and garbage collection) will always commit the buffer first to have a full index to search in.

### compression

[](#compression)

Enable compression to reduce disk space usage. The extension supports multiple compression algorithms and will auto-detect the best available one.

```
'options' => [
    'compression' => true,
    'compressionAlgorithm' => 'zstd',  // 'zstd', 'gzdeflate', or 'gzcompress'
    'compressionLevel' => 3,           // -1 to 9 (default: -1 = auto)
    'compressionMinSize' => 256,       // minimum bytes to compress (default: 256)
],
```

**Available algorithms (in order of preference):**

AlgorithmSpeedRatioRequirement`zstd`⚡ FastExcellentext-zstd`gzdeflate`MediumGoodext-zlib`gzcompress`MediumGoodext-zlib- **Auto-detection**: If `compressionAlgorithm` is not set, the best available algorithm is used automatically.
- **Minimum size**: Data smaller than `compressionMinSize` bytes is not compressed (overhead not worth it).
- **Backward compatible**: Existing caches using legacy `gzcompress` will still decompress correctly.

For more detailed information, refer to the following resources:

[Lucene-cache GitHub Repository](https://github.com/andersundsehr/lucene-cache)

[TYPO3 Documentation on Caching Framework](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/CachingFramework/Index.html#caching-framework)

These resources provide comprehensive documentation and examples to help you get started with the lucene-cache backend for TYPO3.

Credits
=======

[](#credits)

This extension is inspired by Benni Mack's [bmack/local-caches](https://github.com/bmack/local-caches)

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~108 days

Total

12

Last Release

59d ago

Major Versions

1.1.3 → 2.0.02025-01-10

2.0.2 → 3.0.02025-09-23

3.0.0 → 4.0.02026-03-20

PHP version history (4 changes)1.0.0PHP ^8.1

1.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

4.0.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce27306c234536251754f00414959671d4a775e9cf57cce2f5ea1dca158183d6?d=identicon)[andersundsehr](/maintainers/andersundsehr)

---

Top Contributors

[![weakbit](https://avatars.githubusercontent.com/u/12049749?v=4)](https://github.com/weakbit "weakbit (27 commits)")[![Kanti](https://avatars.githubusercontent.com/u/471387?v=4)](https://github.com/Kanti "Kanti (1 commits)")

### Embed Badge

![Health badge](/badges/weakbit-lucene-cache/health.svg)

```
[![Health](https://phpackages.com/badges/weakbit-lucene-cache/health.svg)](https://phpackages.com/packages/weakbit-lucene-cache)
```

###  Alternatives

[lochmueller/staticfilecache

Transparent static file cache solution using mod\_rewrite and mod\_expires. Increase performance for static pages by a factor of 230!!

1311.3M3](/packages/lochmueller-staticfilecache)[eliashaeussler/typo3-warming

Warming - Warms up Frontend caches based on an XML sitemap. Cache warmup can be triggered via TYPO3 backend or using a console command. Supports multiple languages and custom crawler implementations.

20229.9k](/packages/eliashaeussler-typo3-warming)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
