Add test code for system/Cache/Handlers/RedisHandler.php#585
Add test code for system/Cache/Handlers/RedisHandler.php#585lonnieezell merged 3 commits intocodeigniter4:developfrom
Conversation
| $this->prefix = $config['prefix'] ?? ''; | ||
|
|
||
| if (isset($config->redis)) | ||
| if (!empty($config)) |
There was a problem hiding this comment.
I know it's nit-picky, but according to our style guide, there should be a space after the exclamation.
There was a problem hiding this comment.
OK, I update coding style and previous RP code too.
| $this->assertFalse($this->redisHandler->delete(self::$dummy)); | ||
| } | ||
|
|
||
| //FIXME: I don't like all Hash logic very much. It's wasting memory. |
There was a problem hiding this comment.
Which part are you concerned about here?
There was a problem hiding this comment.
Redis strcture is following now. So 'data' field is not exists.
'key' : [
'__ci_type' : xxxxx,
'__ci_value': yyyyy
]
And I think Redis have many functions. I want to use set, get and etc too.
set is very simple and a small amount of memory.
There was a problem hiding this comment.
Sounds like you know more than I do here. I'm actually not very familiar with the intricacies of Redis, and have only used it a little.
|
not to be too picky, but we expect commits to be GPG-signed :) |
|
Hi @jim-parry , @lonnieezell |
|
@KazuakiM Your last commit is indeed GPG-signed, thank you :) (the earlier two weren't) |
|
@KazuakiM Are you done with this or still working on it? |
|
@lloricode |
|
Thanks. Merging in. |
system/Cache/Handlers/RedisHandler.php
I changed to fix to consider multiple Redis servers.
And we set the response format of
getMetaDatasame asMemcachedHandler.php.tests/system/Cache/Handlers/RedisHandlerTest.php (new)
I added a test code, but it is not very good.
I think that memory capacity and access speed are not good because all are stored in Hash structure.