JXCacheManager.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // JXCacheManager.h
  3. // AICity
  4. //
  5. // Created by TogetherWatch on 2025-10-13.
  6. // Feature: 003-ios-api-https - 剧星短剧平台API接入
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * 剧星平台缓存管理器
  12. */
  13. @interface JXCacheManager : NSObject
  14. + (instancetype)sharedManager;
  15. /**
  16. * 保存分类列表缓存
  17. */
  18. - (void)saveCategoryList:(NSArray *)categories;
  19. /**
  20. * 获取分类列表缓存
  21. */
  22. - (nullable NSArray *)getCategoryList;
  23. /**
  24. * 保存短剧列表缓存
  25. */
  26. - (void)saveDramaList:(NSArray *)dramas
  27. forCategory:(NSString *)categoryId
  28. page:(NSInteger)page;
  29. /**
  30. * 获取短剧列表缓存
  31. */
  32. - (nullable NSArray *)getDramaListForCategory:(NSString *)categoryId
  33. page:(NSInteger)page;
  34. /**
  35. * 保存短剧详情缓存
  36. */
  37. - (void)saveDramaDetail:(NSDictionary *)detail
  38. forDramaId:(NSString *)dramaId;
  39. /**
  40. * 获取短剧详情缓存
  41. */
  42. - (nullable NSDictionary *)getDramaDetailForDramaId:(NSString *)dramaId;
  43. /**
  44. * 清除所有缓存
  45. */
  46. - (void)clearAllCache;
  47. /**
  48. * 清除过期缓存
  49. */
  50. - (void)clearExpiredCache;
  51. @end
  52. NS_ASSUME_NONNULL_END