File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ private function getAllKeys(): array {
210210 $ time = time ();
211211
212212 foreach ($ this ->all_keys as $ key_data ) {
213+ $ key_data = $ this ->memcached ->parseLine ($ key_data );
214+
213215 $ key = $ key_data ['key ' ];
214216
215217 if (stripos ($ key , $ search ) !== false ) {
Original file line number Diff line number Diff line change @@ -120,22 +120,18 @@ public function isConnected(): bool {
120120 */
121121 public function getKeys (): array {
122122 $ raw = $ this ->runCommand ('lru_crawler metadump all ' );
123- $ lines = array_filter ( explode ("\n" , trim ( $ raw)), static fn ( $ line ): bool => ! empty ( $ line ) && $ line !== ' END ' );
124- $ keys = [] ;
123+ $ lines = explode ("\n" , $ raw );
124+ array_pop ( $ lines ) ;
125125
126- foreach ($ lines as $ line ) {
127- $ keys [] = $ this ->parseLine ($ line );
128- }
129-
130- return $ keys ;
126+ return $ lines ;
131127 }
132128
133129 /**
134130 * Convert raw key line to an array.
135131 *
136132 * @return array<string, string|int>
137133 */
138- private function parseLine (string $ line ): array {
134+ public function parseLine (string $ line ): array {
139135 $ data = [];
140136
141137 foreach (\explode (' ' , $ line ) as $ part ) {
You can’t perform that action at this time.
0 commit comments