aboutsummaryrefslogtreecommitdiff
path: root/app/rediscache.py
blob: 718a82ed4c08f7e070d5240f33fd1ab474c8d635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from . import r

# This file acts as a facade between the releases code and redis,
# and also means that the releases code avoids knowing about `app`

def make_download_key(ip, package):
	return ("{}/{}/{}").format(ip, package.author.username, package.name)

def set_key(key, v):
	r.set(key, v)

def has_key(key):
	return r.exists(key)