Repository navigation
gedis-v0.1.8.zip
This pull request introduces several improvements and refactors to the Gedis core and its modules, focusing on consistent keyspace event publishing, time source abstraction, and utility optimizations. The changes ensure that all keyspace-modifying operations emit appropriate events, time management is unified and extensible, and glob pattern matching is more efficient. There are also updates to method naming for clarity and interface consistency.
Keyspace Event Publishing Enhancements:
- All set, delete, and expire operations in hashes, lists, sets, sorted sets, and strings now publish standardized keyspace events (
set,del,expire) for improved observability and integration. [1] [2] [3] [4] [5] [6]
Time Source Abstraction and Management:
- The Gedis core now receives a
Gedisinstance for time source access, allowing for more flexible and testable time handling. The time source interface adds atickmethod, and time updates are propagated via the main process loop. [1] [2] [3] [4] [5] - Expiry checks and restoration now use the unified time source instead of direct system time calls, ensuring consistency.
Utility and Performance Improvements:
- Glob pattern regex compilation now uses a cache to avoid redundant work and improve performance. [1] [2]
API and Method Naming Consistency:
- Methods for dumping and restoring state have been renamed for clarity (
dump_all,restore_all), and new helper methods for keyspace prefix management (ks,rks) have been added to both core and main Gedis classes. [1] [2] [3] [4] - Hash existence checks now support querying for the existence of the entire hash as well as individual fields, improving API flexibility. [1] [2]
Debugger Integration Updates:
- Debugger commands now use the new
dump_keymethod for retrieving key values, aligning with the refactored API. [1] [2]