Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#15264 closed (fixed)

Problem with custom cache backend

Reported by: Stephane Owned by: nobody
Component: Core (Cache system) Version: 1.3-beta
Severity: Keywords: blocker
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



I have a problem since Django 1.3 to start our project with our custom cache backend:
CACHE_BACKEND = "portail.cache.backends.filesandmint://"

This is the error:

File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands/", line 81, in inner_run


File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 243, in validate

from import get_validation_errors

File "/usr/local/lib/python2.6/dist-packages/django/core/management/", line 3, in <module>

from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation

File "/usr/local/lib/python2.6/dist-packages/django/contrib/contenttypes/", line 13, in <module>

from django.contrib.admin.options import InlineModelAdmin, flatten_fieldsets

File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/", line 4, in <module>

from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL

File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/", line 10, in <module>

from django.views.decorators.csrf import csrf_protect

File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/", line 1, in <module>

from django.middleware.csrf import CsrfViewMiddleware

File "/usr/local/lib/python2.6/dist-packages/django/middleware/", line 14, in <module>

from django.utils.cache import patch_vary_headers

File "/usr/local/lib/python2.6/dist-packages/django/utils/", line 24, in <module>

from django.core.cache import get_cache

File "/usr/local/lib/python2.6/dist-packages/django/core/cache/", line 168, in <module>

cache = get_cache(DEFAULT_CACHE_ALIAS)

File "/usr/local/lib/python2.6/dist-packages/django/core/cache/", line 165, in get_cache

"Could not find backend '%s': %s" % (backend, e))

django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'portail.cache.backends.filesandmint': 'module' object has no attribute 'filesandmint'

But if we change the setting to:
CACHE_BACKEND = "portail.cache.backends.filesandmint.CacheClass://"
The project start...

Best regards,


Change History (3)

comment:1 Changed 5 years ago by russellm

  • Keywords blocker added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

This is a bug in a new feature, so it's a blocker.

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

In [15488]:

Fixed #15264 -- Ensured that legacy cache backends specified using the legacy cache format continue to work. Thanks to Stephane for the report.

comment:3 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top