Skip to main content
Winter Memdb runs embedded in-memory database engines (Redis, Apache Ignite, Memcached, and Hazelcast) as part of the application lifecycle, auto-starting on boot and stopping on shutdown.
Memdb launches and manages the server process for you. If you only need client access to an existing server, use the Redis or Memcache modules instead.

Setup

This module requires the swoole PHP extension. Install the package:
Enable the module in application.yml:
configFile is a file path (relative to the config directory or an absolute path).

memdb-config.yml

The configuration file can define any number of engines, each with its own top-level key:

1. Redis

Many server configurations are allowed. Client beans are auto-created by the framework using the given name, for example redisServerBean01.

2. Apache Ignite

Many server configurations are allowed. Client beans are auto-created by the framework using the given name, for example igniteServerBean01.

3. Memcached

This requires the memcached or memcache PHP extension.
Many server configurations are allowed. Client beans are auto-created by the framework using the given name, for example memcachedServerBean01.

4. Hazelcast

Hazelcast needs the memcached PHP extension as a client:
Hazelcast configuration:
Many server configurations are allowed. Client beans are auto-created by the framework using the given name, for example hazelcastBean01.
Hazelcast configuration needs memcache enabled. See the Hazelcast documentation for details: https://docs.hazelcast.com/imdg/4.2/clients/memcache.html