8000 [BUG] InvalidCacheKey (memcached) with Key-length ~249 · Issue #7595 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to conte 8000 nt
[BUG] InvalidCacheKey (memcached) with Key-length ~249 #7595
Closed
@wfehr

Description

@wfehr

Recently came across this: When the internal CMS-cache-key for placeholders has a length of 249, an InvalidCacheKey error is raised.
I used memcached for the backend.

Reason:

So if the key is 249 characters long, the cms-hashing won't be called (due to if len(cache_key) > 250) and django adds :1 (or sth like that) which results in > 250 characters leading to InvalidCacheKey-error.

Even if you would set cache.set(key, value, version=""), django would still add : to it which results in same error when the "plain cms-cache-key" is exactly 250 characters long.

Additional information (CMS/Python/Django versions)

  • cms: 3.11.1
  • django: 3.2.18
  • python: 3.11

Do you want to help fix this issue?

  • Yes, I want to help fix this issue and I will join #workgroup-pr-review on Slack to confirm with the community that a PR is welcome.
  • No, I only want to report the issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0