Breaking Changes Inbound
-
Rework entire module, deprecating previous implementation into
v1
, maintaining legacyv2
namespace, while transforming the previousv2
into the primary module. The final release version of0.2.0
will not contain any modules, but rather reference thev2
namespace as the primary module. -
Rework
pydantic
dependencies to support bothv1/v2
.
- Rework
cachify
module
- Add new
add_fallback_function
method for Worker, which allows for a fallback function to be called when the worker fails to execute the task. (v2)
- Start of migration of library to maintain upstream compatibility
with
redis-py
. - Usable in
aiokeydb.v2
namespace. Will complete full migration by v0.1.50 - Attempts to maintain backwards compatibility with
aiokeydb
v0.1.19 - All classes are now subclassed from
redis
andredis.asyncio
rather than being explictly defined. - Worker tasks functions are now callable via
KeyDBClient
andKeyDBWorkerSettings
- Rework
ConnectionPool
andAsyncConnectionPool
to handle resetting of the connection pool when the maximum number of connections are reached.
- Add utility to set ulimits when initializing the connection pool.
- Resolve ConnectionPools with reset capabilities
- Refactor
KeyDBSession
to utilize the ConnectionPool initialized byKeyDBClient
- Refactor
KeyDBClient
to initialize Sessions using shared connection pools for async and sync in order to avoid spawning a new connection pool per session. - Moved certain class vars to its own state for
KeyDBSesssion
- Reorder Worker Queue initialization to prevent overlapping event loops
- Implement certain changes from
redis-py
- kept previous
KeyDBClient
that is accessible viaaiokeydb.client.core
vsaiokeydb.client.meta
- Resolve worker issues for startup ctx
- hotfix for locks.
- add
_lazy_init
param toKeyDBClient.cachify
to postpone session initialization if the session has not already been configured - add
_cache_invalidator
param toKeyDBClient.cachify
to allow for custom cache invalidation logic. If the result is True, the key will be deleted first prior to fetching from the cache. - add
debug_enabled
param toKeyDBSettings
to enable debug logging for theKeyDBClient
session.
- add
overwrite
option forKeyDBClient.configure
to overwrite the default session.
- Migration of
aiokeydb.client
->aiokeydb.core
andaiokeydb.asyncio.client
->aiokeydb.asyncio.core
- Unified API available through new
KeyDBClient
class that createssessions
which areKeyDBSession
inherits fromKeyDB
andAsyncKeyDBClient
class that inherits fromAsyncKeyDB
class - Implemented
.cachify
method that allows for a caching decorator to be created for a function