]> git.lizzy.rs Git - cheatdb.git/blob - app/rediscache.py
Fix typo
[cheatdb.git] / app / rediscache.py
1 from . import r
2
3 # This file acts as a facade between the releases code and redis,
4 # and also means that the releases code avoids knowing about `app`
5
6 def make_download_key(ip, package):
7         return ("{}/{}/{}").format(ip, package.author.username, package.name)
8
9 def set_key(key, v):
10         r.set(key, v)
11
12 def has_key(key):
13         return r.exists(key)