Componette

Componette

Kdyby

Kdyby / Redis v6.1.3

Redis storage for Nette Framework

download-cloud-line composer require kdyby/redis
  • v6.1.3 v6.1.3

    What's Changed

    New Contributors

    Full Changelog: v6.1.2...v6.1.3

  • v6.1.2 v6.1.2

    What's Changed

    Full Changelog: v6.1.1...v6.1.2

  • v6.1.1 v6.1.1

    What's Changed

    New Contributors

    Full Changelog: v6.1.0...v6.1.1

  • v6.1.0 v6.1.0

    • 🐘 PHP Support only 7.4 | 8.0 | 8.1
    • Fixes #113 & #109 & #111

    Thanks @KacerCZ & @zabous


    What's Changed

    • Fixed reading extension config for session (RedisExtension.php) by @zabous in #110
    • Added support for PHP 8.1 by @KacerCZ in #112

    Full Changelog: v6.0.0...v6.1.0

  • v6.0.0 v6.0.0

    • 🐘 PHP Support only 7.4 | 8.0
    • Only Nette 3 support
    • Dropped support for Redis client version 3 and older. Removed Kdyby/Redis/Driver/PhpRedisDriverOld
    • Dropped Travis, using GHA
    • Added makefile for composer, cs, phpstan, tests
    • Dropped old exception aliases, use new namespace
    • Added ClientSchema
    • Added RedisSchema

    Thanks @PavelJurasek & @pechondra

    & PeckaDesign

  • v5.2.0 v5.2.0

    PHP 8 support

    Internal
  • v5.1.0 v5.1.0

    Features in this release

    Added support for PHP 7.4 and only Nette/Utils 3.0

    BC breaks

    • Dropped support for Nette/Utils 2.5 now only in version 3.0 @KacerCZ #95
    • Updated compatibility with PHP 7.4 thanks @KacerCZ #95

    Internal

  • v5.0.1 5.0.1

    Removed Nette/Reflection, this package is discontinued.

    Class references in test use only standard PHP reflection classes.
    

    PR #87 thanks @KacerCZ!

  • v5.0.0 v5.0.0

    Features in this release

    • Nette 3 support
    • Coding standard updated
    • Travis cleanup and unification
    • Composer, compatibility packages and loading

    PR #85

    Features:

    Coding standard

    • Use strict_types
    • Return types where posible, anotated all the array returned
    • Typed method arguments where possible, anotated otherwise
    • Upper cased null/false/true
    • Global function fqn

    Travis

    • Removed unused nette libraries
    • Added PHPStan to travis
    • Added CodingStandard to travis

    Composer

    • Autoload set to PSR4

    Changes:

    • Supported PHP => 7.1
    • Nette/Caching to ~3.0
    • Nette/Deprecated to ~3.0
    • Nette/DI to ~2.4.10 || ~3.0
    • Nette/Http ~2.4.7 || ~3.0
    • Nette/Utils ~2.5 || ~3.0
    • Nette/Reflection ~2.4
    • Removed \Kdyby\Redis\IRedisDriver::class and \Kdyby\Redis\IRedisDriverOld::class because they had outdated methods and docblocks, needed to be updated with redis changes. Also they had same methods as \Redis and as interfaces they needed to have same type hints as implemented classes wich depends on installed version on client server. All this meant 30+ CS and PHPStan skipped rules and no added value. So use default \Redis hinting and if needed add some undocumented stuff add it in docblok of \Kdyby\Redis\Driver\PhpRedisDriver::class since it is named driver it is appropriate place.
    • class RedisLuaJournal extends RedisJournal implements Nette\Caching\Storages\IJournal -> class RedisLuaJournal extends \Kdyby\Redis\RedisJournal
    • Composer requires ext-redis (php check remains)

    Exceptions moved to separate files and changed namespace. For compatibility there is Typo3/ClassAliasLoader with aliased old namespaces. For future uses please use new namespaces.

    \Kdyby\Redis\ConnectionException        => \Kdyby\Redis\Exception\ConnectionException
    \Kdyby\Redis\Exception                   => \Kdyby\Redis\Exception\IException
    \Kdyby\Redis\InvalidArgumentException    => \Kdyby\Redis\Exception\InvalidArgumentException
    \Kdyby\Redis\LockException               => \Kdyby\Redis\Exception\LockException
    \Kdyby\Redis\MissingExtensionException   => \Kdyby\Redis\Exception\MissingExtensionException
    \Kdyby\Redis\RedisClientException        => \Kdyby\Redis\Exception\RedisClientException
    \Kdyby\Redis\SessionHandlerException     => \Kdyby\Redis\Exception\SessionHandlerException
    \Kdyby\Redis\TransactionException       => \Kdyby\Redis\Exception\TransactionException
    

    Argument types and return types (mentioning only some which can be problem)

    • \Kdyby\Redis\DI\RedisExtension::PANEL_COUNT_MODE is private
    • Config option array_key(redis.client) is expected string|null
    • \Kdyby\Redis\Diagnostics::TIMER_NAME is private
    • Added types \Kdyby\Redis\Diagnostics\Panel::begin
    • \Kdyby\Redis\Driver\PhpRedisDriverOld::script now accepts only declared arguments, dropped func_get_args
    • Added types \Kdyby\Redis\ExclusiveLock::acquireLock
    • Added types \Kdyby\Redis\ExclusiveLock::release
    • Added types \Kdyby\Redis\ExclusiveLock::increaseLockTimeout
    • Added types \Kdyby\Redis\ExclusiveLock::getLockTimeout
    • Added types \Kdyby\Redis\ExclusiveLock::formatLock
    • Added types \Kdyby\Redis\RedisClient::__construct
    • Added types \Kdyby\Redis\RedisClient::unlock
    • Added types \Kdyby\Redis\RedisClient::lock
    • Added types \Kdyby\Redis\RedisClient::__call
    • Added types \Kdyby\Redis\RedisClient::__get
    • Added types \Kdyby\Redis\RedisClient::__set
    • Added types \Kdyby\Redis\RedisClient::__isset
    • \Kdyby\Redis\RedisJournal and Lua version constants made private
    • Added types \Kdyby\Redis\RedisJournal::write
    • Added types \Kdyby\Redis\RedisJournal::formatKey
    • \Kdyby\Redis\RedisStorage constants made private
    • Added types \Kdyby\Redis\RedisStorage::read
    • Added types \Kdyby\Redis\RedisStorage::lock
    • Added types \Kdyby\Redis\RedisStorage::unlock
    • Added types \Kdyby\Redis\RedisStorage::write
    • Added types \Kdyby\Redis\RedisStorage::remove

    And more, see #85 for all changes

  • v4.1.0 v4.1.0

    Compatibility with phpredis v3 and v4.

  • v4.0.0 v4.0.0

  • v3.2.0 v3.2.0

    • Bumped Nette dependency to 2.2
    • Support for persistent connections (opt-in experimental)
    • more micro-optimalizations
    • Added IMultiReadStorage for reading multiple cache entries at once
    • Minimum redis server version is 2.6
    • Diagnostics: 'debugger: off' hides whole panel
    • Lazy creation of Driver\PhpRedisDriver
  • v2.3.2 v2.3.2

    • support for persistent connections
    • Lazy creation of Driver\PhpRedisDriver
    • fixed compatibility with phpredis
    • backported micro-optimalizations
  • v3.1.2 v3.1.2

    • fixed support for persistent connections (opt-in experimental)
    • more micro-optimalizations
    • Added IMultiReadStorage for reading multiple cache entries at once
  • v3.1.1 v3.1.1

    • Locked dependency on Nette to 2.1.*
    • Minimum redis server version is 2.6
    • Diagnostics: 'debugger: off' hides whole panel
    • Lazy creation of Driver\PhpRedisDriver
  • v3.1.0 v3.1.0

    • build improvements
    • fixed compatibility with newer phpredis
    • forward compatibility with Nette
    • micro-optimalizations
    • Info command returns db's info in associative array format [BC Break]
    • Experimentally use write method from old RedisJournal in RedisLuaJournal
  • v3.0.0 v3.0.0

    • Bumped Nette dependency to ~2.1@dev
    • lock duration is configurable
  • v2.3.1 v2.3.1

    • Locked dependency to Nette 2.0.*
    • backported few features from master
  • v1.0.5 v1.0.5

    • Fixed return value of RedisStorage::read() when the key was dropped because there wasn't enought memory.
  • v1.0.4 v1.0.4

    Do not install this realease, tests didn't pass on Travis.

  • v2.3.0 v2.3.0

    • Storage uses only one key for both metadata and data itself, which means that the storage sends only half of the requests now. [BC BREAK]
    • Option to disable cache locks in data storage
    redis:
        storage: {locks: off}

    This means the storage is on, and is not using locks.


    WARNING: please flush your cache completely before upgrading. The data format is not compatible.

  • v2.2.0 v2.2.0

    Non-native session handler with locks is back!

    I was sad that the native handler doesn't care about locks (which I didn't notice till recently), so I had to revert the old session handler written in PHP. The native is still default, but this pull adds new option to turn it back on

    redis:
        session:
            native: off

    There should be no problem in session data compatibility. It should just work.


    Also, thanks to @matej21, the journal has new internal structure, which should be exponentially faster on absurd numbers (hundreds of thousands or even milions) of tagged keys.

    • Don't forget to flush your cache!
  • v2.1.3 v2.1.3

    • Greately optimised Lua Journal (thanks to @matej21 for the hint)
    • When using storage with lua journal, it automatically removes storage keys in single transaction, without returning them to storage to delete them one by one from client
    • Don't forget to flush your cache
  • v2.1.2 v2.1.2

  • v2.1.1 v2.1.1

  • v2.1.0 Lua journal

    This new journal takes advantage of Redis's scripting feature. You can create scripts in lua and Redis will execute them for you. This lowers latency and dramatically decreases number of requests that has to be send.

bar-chart-fill

Statistics

download-cloud-fill
1007897
star-fill
49
bug-fill
32
flashlight-fill
85d
price-tag-2-line

Badges

guide-fill

Dependencies

php (7.1.* || 7.2.* || 7.3.*)
ext-redis (*)
nette/di (~2.4.10 || ~3.0)
nette/http (~2.4.7 || ~3.0)
nette/utils (~2.5 || ~3.0)
Componette Componette felix@nette.org