aptivate / dye

Deploy Your Environment using fabfile.org
http://aptivate.org/
GNU General Public License v3.0
13 stars 9 forks source link

How about enabling CACHE by default? #65

Open qris opened 10 years ago

qris commented 10 years ago
MIDDLEWARE_CLASSES = (
    'django.middleware.cache.UpdateCacheMiddleware',
    ...
    'django.middleware.cache.FetchFromCacheMiddleware',
)

# turn on general caching, but not for logged in users
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
        'LOCATION': 'cache',
    }
}

# test stuff
import sys
if 'test' in sys.argv:
    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
        }
    }

CMS_CACHE_DURATIONS = {
    'content': 60,
    'menus': 600,
}
qris commented 10 years ago

Enabling the Cache caused a bug to show up in Washwatch: serialising the results of rendering a PDF using Pickle failed, because it tries to serialise a Hashlib object for some reason. Pickle makes this impossible to debug. Points to note: