Created
May 6, 2013 17:04
-
-
Save blackrobot/5526433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.core import cache | |
from micawber.providers import bootstrap_embedly as _bootstrap_embedly | |
def bootstrap_embedly(): | |
""" This bootstraps micawber with the embedly bootstrapper, but uses a | |
specific cache. | |
""" | |
return _bootstrap_embedly(cache.get_cache(settings.MICAWBER_CACHE_NAME), | |
key=settings.MICAWBER_EMBEDLY_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CACHES = { | |
'default': { | |
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', | |
'LOCATION': '127.0.0.1', | |
}, | |
'filecache': { | |
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', | |
'LOCATION': '/var/tmp/django_cache', | |
'TIMEOUT': 60 * 60 * 24 * 60, # 60 Days | |
'MAX_ENTRIES': 5000, | |
}, | |
} | |
# Micawber | |
MICAWBER_CACHE_NAME = 'filecache' | |
MICAWBER_PROVIDERS = 'source.utils.embedly.bootstrap_embedly' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment