aimeos/ai-cache

Cache extension for Aimeos e-commerce solutions

Installs: 16 395

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 4

Forks: 3

Open Issues: 0

Type:aimeos-extension

2024.10.2 2024-11-09 16:20 UTC

README

Aimeos logo

Aimeos cache extension

Build Status Coverage Status Scrutinizer Code Quality License

The Aimeos cache extension contains alternative cache implementations to the database caching of the core. They can be used by Aimeos web shops to offload generated HTML web site parts to other services like specialized key/value stores.

Table of contents

Installation

As every Aimeos extension, the easiest way is to install it via composer. If you don't have composer installed yet, you can execute this string on the command line to download it:

php -r "readfile('https://getcomposer.org/installer');" | php -- --filename=composer

To add the extionsion to your composer-based installation, execute:

composer req "aimeos/ai-cache"

These command will install the Aimeos extension into the extension directory and it will be available immediately.

Configuration

The ways of adding the required resource configuration depends on the software you are using because all have their own means to do that. Here are some examples:

Laravel (in config/shop.php):

return [
    ...
    'resource' => [
        ...
        'cache' => [
            '<name>' => [
                ...
            ],
        ],
    ],
];

Symfony (in app/config/config.yml):

aimeos_shop:
    resource:
        cache:
            <name>:
                ...

TYPO3 (via TypoScript in the setup template):

plugin.tx_aimeos.settings.resource.cache {
    <name> {
        ...
    }
}

Redis

Redis is an in-memory caching server known for its speed and advanced features. It supports not only plain key/value pairs but also lists for values used by Aimeos for tagging cached entries. This allows a fine control of removing outdated HTML parts.

After you've set up a Redis server, you need to tell your Aimeos shop installation how to connect to this server. The cache extension is using the Predis library and supports all configuration options available. The resource configuration consists of the name "redis" ( in the introduction to the config section) and the list of configuration key/value pairs, e.g.

Symfony:

aimeos_shop:
    resource:
        cache:
            redis:
                scheme: tcp
                host: 10.0.0.1
                port: 6379

TYPO3:

plugin.tx_aimeos.settings.resource.cache {
    redis {
        scheme = tcp
        host = 10.0.0.1
        port = 6379
    }
}

Please have a look at the fine Predis readme for all available options.

License

The Aimeos cache extension is licensed under the terms of the LGPLv3 Open Source license and is available for free.

Links