|
@@ -15,7 +15,7 @@ def encrypt(text: str):
|
|
|
|
|
|
def redis_exists(href: str, redis_cluster):
|
|
|
href_sign = encrypt(href)
|
|
|
- list_sign = encrypt(f'pylist_{href}')
|
|
|
+ list_sign = 'pylist_' + href_sign
|
|
|
if redis_cluster.exists(href_sign) > 0 or redis_cluster.exists(list_sign) > 0:
|
|
|
return True
|
|
|
return False
|
|
@@ -23,7 +23,7 @@ def redis_exists(href: str, redis_cluster):
|
|
|
|
|
|
def redis_set(href: str, redis_cluster, val=1):
|
|
|
if not redis_exists(href, redis_cluster):
|
|
|
- sign = encrypt(f'pylist_{href}')
|
|
|
+ sign = 'pylist_' + encrypt(href)
|
|
|
expiration_time = 86400 * 365 * 2
|
|
|
redis_cluster.set(sign, val, ex=expiration_time)
|
|
|
return True
|