Files
dcalc/backend/preheat.py
T
2026-05-26 01:50:30 +08:00

16 lines
358 B
Python

import time
from api.core.RedisPreheat import preheat_redis_cache
def main():
start = time.perf_counter()
print('Redis 缓存预热开始...')
warmed_keys = preheat_redis_cache()
duration = time.perf_counter() - start
print(f'Redis 缓存预热完成: {len(warmed_keys)} keys, {duration:.2f}s')
if __name__ == '__main__':
main()