You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Chunk key field is a CharField, which can take almost any kind of character data, including Unicode, spaces, whatever.
In the templatetag, the chunk key is used as part of the cache key. If using memcached with python-memcached, even spaces are illegal in a cache key. This causes 500 errors.
My first solution was to slugify the chunk key before using it as cache key. This works, but raises the possibility of two overly-similar (but still unique) chunk keys slugifying to the same cache key and stomping over each other's cache. The only way this would really work is if chunks gained an actual SlugField with uniqueness enforced.
So my second solution (found in my fork) was to rip out the direct caching support entirely. IMO there's no reason for django-chunks to have its own (buggy) cache support, when its just as easy (and more flexible) to wrap calls to the chunk tag with Django's built-in template fragment caching tags.
The text was updated successfully, but these errors were encountered:
The Chunk key field is a CharField, which can take almost any kind of character data, including Unicode, spaces, whatever.
In the templatetag, the chunk key is used as part of the cache key. If using memcached with python-memcached, even spaces are illegal in a cache key. This causes 500 errors.
My first solution was to slugify the chunk key before using it as cache key. This works, but raises the possibility of two overly-similar (but still unique) chunk keys slugifying to the same cache key and stomping over each other's cache. The only way this would really work is if chunks gained an actual SlugField with uniqueness enforced.
So my second solution (found in my fork) was to rip out the direct caching support entirely. IMO there's no reason for django-chunks to have its own (buggy) cache support, when its just as easy (and more flexible) to wrap calls to the chunk tag with Django's built-in template fragment caching tags.
The text was updated successfully, but these errors were encountered: