Download the PHP package bmack/local-caches without Composer

On this page you can find all versions of the php package bmack/local-caches. 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 local-caches

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?

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

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

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

License

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

Open Issues

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

Credits

This package was created by Benni Mack in 2023 for b13 GmbH.

Inspiration came from Andy Grunwald and Wolfgang Gassler from Engineering Kiosk Podcast.

Find more TYPO3 extensions we have developed 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.


All versions of local-caches with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^9.3 || ^10.0 || ^11.0 || ^12.0
php Version ^7.2 || ^8.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 bmack/local-caches contains the following files

Loading the files please wait ....