__init__.py 527 B

123456789101112131415161718
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. 缓存管理模块
  5. 使用方式:
  6. from foundation.observability.cachefiles import cache, CacheBaseDir
  7. # 保存数据(必须指定根目录,文件名自动使用变量名)
  8. catogues_result = {"key": "value"}
  9. cache.document_temp(catogues_result, base_cache_dir=CacheBaseDir.CONSTRUCTION_REVIEW)
  10. # → temp/construction_review/document_temp/catogues_result.json
  11. """
  12. from .cache_manager import cache, CacheBaseDir
  13. __all__ = ["cache", "CacheBaseDir"]