fix: use expires_in_sec with set_value of cache

This commit is contained in:
Tanmoy Sarkar 2024-01-08 18:13:55 +05:30
parent c0d0b0922a
commit 0fc6b6f6ed

View file

@ -189,7 +189,7 @@ class PushNotification:
# Generate new credentials
token = frappe.generate_hash(length=48)
# store the token in the redis cache
frappe.cache().set_value(f"{self._site_name}:push_relay_registration_token", token, ex=600)
frappe.cache().set_value(f"{self._site_name}:push_relay_registration_token", token, expires_in_sec=600)
body = {
"endpoint": self._site_name,
"protocol": self._site_protocol,