PHPackages                             bmack/local-caches - 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. bmack/local-caches

ActiveLibrary[Caching](/categories/caching)

bmack/local-caches
==================

Provides a custom SQLite-based cache backend for TYPO3

0.0.1(3y ago)4125GPL-2.0-or-laterPHPPHP ^7.2 || ^8.0

Since Jan 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bmack/local-caches)[ Packagist](https://packagist.org/packages/bmack/local-caches)[ RSS](/packages/bmack-local-caches/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

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

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

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

Another side project...

Why this package?
-----------------

[](#why-this-package)

TYPO3 ships with a "Database Cache Backend" for storing a cached version of a page, of the pagetree, eventually moving a lot of code in the same database as the actual content, which is typically MySQL/MariaDB. A typical cached page still requires the database for a handful of queries, plus dozens of checks in the "database cache".

However, when the database system is stored on a separate internal server (the "database server"), which is the case for 99.999% of all shared hosting providers, the network latency (= the duration to have data travel through the LAN cable) increases, which is a natural thing. A few people then played around with using a Filesystem-based cache instead, which also ships with TYPO3 by default, but is not used for the typical page caches. When having a few hundred cache entries (which can happen fast), your file system and the actual hard drives (SSD, please) need to be *really* good.

This package tries to merge the best of both worlds:

TYPO3 has support for SQLite since TYPO3 v9. SQLite can be used to be the database, but stores all information in one single file, which ideally is on the same server as the project. Despite it's name "Lite", it is a fully featured RDBMS which perfectly fits our needs, and it's very fast.

The main idea behind this package here is providing a SQLite cache backend for TYPO3, which automatically takes care of creating the database schema and the SQLite file. If the file is removed (through deployment, or by accident), the schema is re-created.

While at b13.com, we use a memory-based cache backend such as Redis exclusively in our projects, I built this small package to demonstrate that even small TYPO3 projects can benefit from an optimized cache backend. Maybe this package even finds its way into TYPO3 if the maintainers think it's worthy.

Installation
------------

[](#installation)

You need TYPO3 v9.3 or later to use this functionality. Also, ensure to have the "php-sqlite" package activated, and that's it.

Use composer to install this package `composer req bmack/local-caches`.

Configuration
-------------

[](#configuration)

The SQLite database file

After the installation, edit your AdditionalConfiguration.php to define the use of SQLite cache backend. Here's an example for TYPO3 v10+:

```
$caches = [
    'hash',
    'pages',
    'pagesection',
    'rootline',
    'extbase',
];

foreach ($caches as $cacheName) {
    $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['backend'] = \Bmack\LocalCaches\SqliteCacheBackend::class;
}

```

Side Notes
----------

[](#side-notes)

- I've been using this package in a few smaller sites and it "kinda works"
- It creates the DB file and DB structure if it does not exist, maybe there is a better way to do things
- I used a similar approach for b13.com in production for a bit and through profiling I found that a fully cached and with PHP profiling I quickly found page was faster then with Redis. I might need to give this another try and show some stats.

License
-------

[](#license)

The package is licensed under GPL v2+, same as the TYPO3 Core. For details see the LICENSE file in this repository.

Open Issues
-----------

[](#open-issues)

If you find an issue, feel free to create an issue on GitHub or a pull request.

Credits
-------

[](#credits)

This package was created by [Benni Mack](https://github.com/bmack) in 2023 for [b13 GmbH](https://b13.com).

Inspiration came from Andy Grunwald and Wolfgang Gassler from [Engineering Kiosk Podcast](https://engineeringkiosk.dev/).

[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1249d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/165630?v=4)[Benni Mack](/maintainers/bmack)[@bmack](https://github.com/bmack)

---

Top Contributors

[![bmack](https://avatars.githubusercontent.com/u/165630?v=4)](https://github.com/bmack "bmack (3 commits)")

### Embed Badge

![Health badge](/badges/bmack-local-caches/health.svg)

```
[![Health](https://phpackages.com/badges/bmack-local-caches/health.svg)](https://phpackages.com/packages/bmack-local-caches)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[lochmueller/staticfilecache

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

1271.4M4](/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.

22260.2k](/packages/eliashaeussler-typo3-warming)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[b13/assetcollector

Asset collector - Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10125.6k](/packages/b13-assetcollector)

PHPackages © 2026

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