Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 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:

Description

Hi,

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

This is the error:

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

self.validate(display_num_errors=True)

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

from django.core.management.validation import get_validation_errors

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

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

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

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

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

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

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

from django.views.decorators.csrf import csrf_protect

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

from django.middleware.csrf import CsrfViewMiddleware

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

from django.utils.cache import patch_vary_headers

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

from django.core.cache import get_cache

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

cache = get_cache(DEFAULT_CACHE_ALIAS)

File "/usr/local/lib/python2.6/dist-packages/django/core/cache/init.py", 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://192.168.1.100:11211/"
The project start...

Best regards,

Stephane

Attachments (0)

Change History (3)

comment:1 Changed 3 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 3 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 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.