[D7] Automatically shorten cid's in DrupalDatabaseCache

Created on 1 September 2016, almost 8 years ago
Updated 21 September 2022, almost 2 years ago

Problem/Motivation

When you pass in a $cid that is longer than 255 characters, it currently results in an Exception because it's longer that the VARCHAR column.

In addition the recently PhpBackend fails for log cache IDs (300 chars in the test)

Proposed resolution

Use a solution like the memcache module where a cid longer than 255 is replaced by a truncated cid plus a hash to keep it at the length limit but partially readable.

Remaining tasks

  • Create a patch.
  • Review the path.

User interface changes

none

API changes

none

Data model changes

none

This is a backport issue of #2224847: Automatically shorten cid's in Cache\DatabaseBackend and PhpBackend .

🐛 Bug report
Status

RTBC

Version

7.0 ⚰️

Component
Cache 

Last updated about 7 hours ago

Created by

🇯🇵Japan hgoto

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024