[SOLVED]Upgrade from 6.2.5 to 6.3.1 InvalidCacheBackendError: Could not find config for 'django.core.cache.backends.locmem.LocMemCache' in settings.CACHES


#1

I use the following setting in seahub_settings.py with 6.2.5:

COMPRESS_CACHE_BACKEND = 'django.core.cache.backends.locmem.LocMemCache'

With 6.3.1 I get this error:

InvalidCacheBackendError: Could not find config for 'django.core.cache.backends.locmem.LocMemCache' in settings.CACHES

My temporary solution is to uncomment the setting and give permissions on /root/.cache/Python-Eggs to the seafile user.


#2

Found the solution in:
https://github.com/haiwen/seahub/blob/master/seahub/settings.py

You have to add the cache to your seahub_settings.py:

CACHES = {
    # Compatible with existing `COMPRESS_CACHE_BACKEND` setting after
    # upgrading to django-compressor v2.2.
    # ref: https://manual.seafile.com/deploy_pro/deploy_in_a_cluster.html
    'django.core.cache.backends.locmem.LocMemCache': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}