Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
40a7440d
Commit
40a7440d
authored
Nov 25, 2014
by
Alex Pott
Browse files
Issue
#2352207
by martin107, Berdir: Database cache backend does not treat cid as case sensitive
parent
8415e434
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Cache/CacheBackendInterface.php
View file @
40a7440d
...
...
@@ -14,6 +14,8 @@
* Drupal\Core\Cache\DatabaseBackend provides the default implementation, which
* can be consulted as an example.
*
* The cache indentifiers are case sensitive.
*
* @ingroup cache
*/
interface
CacheBackendInterface
{
...
...
core/lib/Drupal/Core/Cache/DatabaseBackend.php
View file @
40a7440d
...
...
@@ -564,6 +564,7 @@ public function schemaDefinition() {
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
'binary'
=>
TRUE
,
),
'data'
=>
array
(
'description'
=>
'A collection of data to cache.'
,
...
...
core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
View file @
40a7440d
...
...
@@ -213,6 +213,11 @@ public function testSetGet() {
$backend
->
set
(
$cid
,
'test'
);
$this
->
assertEqual
(
'test'
,
$backend
->
get
(
$cid
)
->
data
);
// Check that the cache key is case sensitive.
$backend
->
set
(
'TEST8'
,
'value'
);
$this
->
assertEqual
(
'value'
,
$backend
->
get
(
'TEST8'
)
->
data
);
$this
->
assertFalse
(
$backend
->
get
(
'test8'
));
// Calling ::set() with invalid cache tags.
try
{
$backend
->
set
(
'exception_test'
,
'value'
,
Cache
::
PERMANENT
,
[
'node'
=>
[
3
,
5
,
7
]]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment