diff --git a/Py3Cache.py b/Py3Cache.py index 72ab8f41eb73c1cc3959e14fa594d59f94359041..92791f58de77819943dd4e917bf3b135fc02d46f 100644 --- a/Py3Cache.py +++ b/Py3Cache.py @@ -7,7 +7,6 @@ Python Implements Level 2 Cache Broker import sys import json import uuid -import configparser import redis import pickle import threading @@ -15,7 +14,11 @@ import threading from beaker.cache import CacheManager from beaker.util import parse_cache_config_options - +if sys.version < '3': + import ConfigParser as configparser +else: + import configparser + def py3cache_empty(): return None diff --git a/Readme.md b/Readme.md index 2d9dd2e538034e82dcb0e8bdc9564e45ed70e8f0..9197ed4a9152b10ea32f8da70800fbeeb9c2e60a 100644 --- a/Readme.md +++ b/Readme.md @@ -15,8 +15,8 @@ Py3Cache 使用 Redis 的 Pub/Sub 进行缓存事件分发。目前的功能还 ### 环境要求 * Python 3 -* Beaker (一级缓存) -* PyRedis (二级缓存) +* Beaker (一级缓存)(`pip install beaker`) +* PyRedis (二级缓存)(`pip install redis`) * Pickle (序列化器) * Redis (服务)