Skip to content

Commit ba34945

Browse files
committed
fix table cache
1 parent ff4d2f5 commit ba34945

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TableCache.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private function gc(bool $force = false): void
121121
{
122122
if ($force || mt_rand(0, 1000000) < $this->gcProbability) {
123123
$i = 100000;
124-
$table = $this->tableInstance;
124+
$table = $this->tableInstance->table;
125125
foreach ($table as $key => $column) {
126126
if ($column['expire'] > 0 && $column['expire'] < time()) {
127127
$this->deleteValue($key);
@@ -175,7 +175,7 @@ public function delete($key): bool
175175
public function clear(): bool
176176
{
177177
$table = [];
178-
foreach ($this->tableInstance as $key => $column) {
178+
foreach ($this->tableInstance->table as $key => $column) {
179179
$table[] = $key;
180180
}
181181
$ret = true;

0 commit comments

Comments
 (0)