Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cacheops #48

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ kerckhoff/assets/bundles/**/*
.TemporaryItems
.Trashes

# VSCode Environment
.vscode/

stats.json

kerckhoff/static/**/*
Expand Down
11 changes: 10 additions & 1 deletion kerckhoff/kerckhoff/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
'pages',
'user_profile',
'packages',
'search'
'search',

'cacheops'
]

MIDDLEWARE = [
Expand Down Expand Up @@ -249,6 +251,13 @@
CORS_ORIGIN_ALLOW_ALL = True
CORS_URLS_REGEX = r'^/api/.*$'

# Cache Stuff

CACHEOPS_REDIS = env('CACHEOPS_REDIS_ADDRESS', default="redis://redis:6379/1")
CACHEOPS = {
'packages.get': {'ops': 'all', 'timeout': 60*60}
}

# Other stuff

S3_SITE_UPLOAD_BUCKET = env('S3_SITE_UPLOAD_BUCKET')
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ configparser==3.5.0
defusedxml==0.5.0
Django==2.0.2
django-allauth==0.32.0
django-cacheops==4.0.6
django-cors-headers==2.2.0
django-environ==0.4.4
django-extensions==1.8.1
Expand All @@ -22,6 +23,7 @@ docutils==0.13.1
elasticsearch==6.2.0
elasticsearch-dsl==6.1.0
enum34==1.1.6
funcy==1.10.2
future==0.16.0
futures==3.1.1
google-api-python-client==1.6.5
Expand Down Expand Up @@ -50,6 +52,7 @@ python-openid==2.2.5
python3-openid==3.1.0
pytz==2017.2
PyYAML==3.12
redis==2.10.6
requests==2.18.2
requests-oauthlib==0.8.0
retype==17.12.0
Expand Down