mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 19:43:28 +00:00
feat(cache): Implement unified caching subsystem with decorators, strategies, and management
- Added core caching functionality with `Cache` class supporting in-memory and file-based caching. - Introduced `CacheManager` for high-level cache operations and statistics. - Created various cache key generation strategies: `FilepathMethodStrategy`, `APIRequestStrategy`, `SimpleKeyStrategy`, and `CustomStrategy`. - Developed decorators for easy method caching: `cached`, `cached_method`, `cached_api`, and `cached_property`. - Implemented type definitions for cache entries and statistics. - Added comprehensive tests for cache operations, strategies, and decorators to ensure functionality and backward compatibility.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# Decorators package
|
||||
from .caching import cached_method
|
||||
# Import from new unified cache module
|
||||
from renamer.cache import cached_method, cached, cached_api, cached_property
|
||||
|
||||
__all__ = ['cached_method']
|
||||
# Keep backward compatibility
|
||||
__all__ = ['cached_method', 'cached', 'cached_api', 'cached_property']
|
||||
Reference in New Issue
Block a user