Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RedisTools

This tool primary purpose is to pair with my own implementation of PSR-6 pools or PSR-16 Simple Cache:
![RedisCache by Laurent LEGAZ](https://github.com/llegaz/RedisCache/workflows/CI/badge.svg)](https://github.com/llegaz/RedisCache/actions)
[![RedisCache by Laurent LEGAZ](https://github.com/llegaz/RedisCache/workflows/CI/badge.svg)](https://github.com/llegaz/RedisCache/actions)

![redis tools screenshot terminal preview](./redis-tools.png)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"tools"
],
"require": {
"llegaz/redis-adapter": "~0.0.5",
"llegaz/redis-adapter": "~0.1",
"league/climate": "^3.10"
},
"require-dev": {
Expand Down
10 changes: 10 additions & 0 deletions src/RedisInspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public function dumpCacheStore(bool $silent = true): array
$currentDb = $this->getContext()['database'];
$allData = $this->dumpAllRedis($silent, $currentDb, $currentDb + 1);

/***
* @todo rework all those non dumping fonctions !!!
*/
//dd($allData["db{$currentDb}"][self::CACHE_LABEL] );
// Extract cache store data for current DB
return $allData["db{$currentDb}"][self::CACHE_LABEL] ?? [];
}
Expand All @@ -85,6 +89,9 @@ public function dumpCacheStore(bool $silent = true): array
*/
public function dumpAllCacheStores(bool $silent = true): array
{
/***
* @todo rework those PSR 16 utils
*/
$allData = $this->dumpAllRedis($silent);
$cacheStores = [];

Expand All @@ -94,6 +101,9 @@ public function dumpAllCacheStores(bool $silent = true): array
}
}

/***
* @todo rework all those non dumping fonctions !!!
*/
return $cacheStores;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/CliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
$inspector->dumpAllRedis();


/*$inspector->selectDatabase(1);
$inspector->dumpCachePool();*/
$inspector->selectDatabase(3);
$inspector->dumpCacheStore();


echo 'From CliTest.php: adapter used> ' . $inspector->getRedis() . PHP_EOL;
Expand Down