Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Releases: tomcastleman/laravel-memcached-plus

Session Support added

05 Mar 19:39
Compare
Choose a tag to compare

See latest README.md

2.0.0

05 Mar 15:31
Compare
Choose a tag to compare

When defining options you should now set the config key to the Memcached constant name as a string, rather than the actual Memcached constant.

Pre v2.0.0:

'stores' => [
    'memcachedstorefoo' => [
        ...
        'options'    => [
            Memcached::OPT_NO_BLOCK         => true,
            Memcached::OPT_AUTO_EJECT_HOSTS => true,
            Memcached::OPT_CONNECT_TIMEOUT  => 2000,
            Memcached::OPT_POLL_TIMEOUT     => 2000,
            Memcached::OPT_RETRY_TIMEOUT    => 2,
        ],
        ...
    ],
],

v2.0.0 onwards:

'stores' => [
    'memcachedstorefoo' => [
        ...
        'options'    => [
            'OPT_NO_BLOCK'         => true,
            'OPT_AUTO_EJECT_HOSTS' => true,
            'OPT_CONNECT_TIMEOUT'  => 2000,
            'OPT_POLL_TIMEOUT'     => 2000,
            'OPT_RETRY_TIMEOUT'    => 2,
        ],
        ...
    ],
],

This avoids any issues with local environments missing ext-memcached and throwing a warning about undefined constants. The config keys are automatically resolved into Memcached constants by the MemcachedPlus\Connector which throws a RuntimeException if the constant is invalid.