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

adding KEY_PREFIX parameter to set a memcached key prefix #714

Merged
merged 1 commit into from Sep 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions webapp/graphite/local_settings.py.example
Expand Up @@ -50,11 +50,11 @@
# unneeded cache misses. Set to [] to disable caching of images and fetched data
#MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211']
#DEFAULT_CACHE_DURATION = 60 # Cache images and data for 1 minute
#
#MEMCACHE_KEY_PREFIX = 'graphite'

# Set URL_PREFIX when deploying graphite-web to a non-root location
#URL_PREFIX = '/graphite'


#####################################
# Filesystem Paths #
#####################################
Expand Down
3 changes: 2 additions & 1 deletion webapp/graphite/settings.py
Expand Up @@ -62,12 +62,12 @@
CARBONLINK_RETRY_DELAY = 15
REPLICATION_FACTOR = 1
MEMCACHE_HOSTS = []
MEMCACHE_KEY_PREFIX = ''
FIND_CACHE_DURATION = 300
FIND_TOLERANCE = 2 * FIND_CACHE_DURATION
DEFAULT_CACHE_DURATION = 60 #metric data and graphs are cached for one minute by default
LOG_CACHE_PERFORMANCE = False
LOG_ROTATE = True

MAX_FETCH_RETRIES = 2

#Remote rendering settings
Expand Down Expand Up @@ -205,6 +205,7 @@
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': MEMCACHE_HOSTS,
'TIMEOUT': DEFAULT_CACHE_DURATION,
'KEY_PREFIX': MEMCACHE_KEY_PREFIX,
}

# Authentication shortcuts
Expand Down