Backends¶
This section explains extra dependencies.
Redis¶
hermes.backend.redis
depends on redis
[1]. Optionally hiredis
[2] can be used to boost Redis protocol parsing. However, hiredis
gives
significant advantage on big bulk operations and for the workload of this
package the performance improvement is only ~10%.
Supported Redis server implementations:
Redis
KeyDB
Memcached¶
hermes.backend.memcached
depends on pure-python pymemcache
[3].
Inprocess¶
hermes.backend.inprocess
is neither complete backend, nor it is suited for
distributed use. The original purpose was a development need. And in fact
it’s just a wrapper of Python dict
(that provides TTL). It doesn’t have
any memory limiting. Though, it can be used in the limited number of cases
where cache size is a priori small.
Custom¶
A new cache backend can be implemented using the following two base classes.
|
Base backend class. |
Base locking class. |