Skip to content

Commit 2adfe25

Browse files
authored
Remove getCacheKey() and getCacheTag() from Schema (#352)
1 parent 248708f commit 2adfe25

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
- Chg #348: Remove usage of `hasLimit()` and `hasOffset()` methods of `DQLQueryBuilder` class (@Tigrov)
3636
- Enh #350: Refactor according changes in `db` package (@Tigrov)
3737
- New #349: Add `caseSensitive` option to like condition (@vjik)
38+
- Enh #352: Remove `getCacheKey()` and `getCacheTag()` methods from `Schema` class (@Tigrov)
3839

3940
## 1.2.0 March 21, 2024
4041

src/Schema.php

-26
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
use function array_fill_keys;
2323
use function array_map;
2424
use function is_array;
25-
use function md5;
26-
use function serialize;
2725
use function str_replace;
2826

2927
/**
@@ -763,28 +761,4 @@ private function loadTableConstraints(string $tableName, string $returnType): mi
763761

764762
return $result[$returnType];
765763
}
766-
767-
/**
768-
* Returns the cache key for the specified table name.
769-
*
770-
* @param string $name The table name.
771-
*
772-
* @return array The cache key.
773-
*/
774-
protected function getCacheKey(string $name): array
775-
{
776-
return [self::class, ...$this->generateCacheKey(), $this->db->getQuoter()->getRawTableName($name)];
777-
}
778-
779-
/**
780-
* Returns the cache tag name.
781-
*
782-
* This allows {@see refresh()} to invalidate all cached table schemas.
783-
*
784-
* @return string The cache tag name.
785-
*/
786-
protected function getCacheTag(): string
787-
{
788-
return md5(serialize([self::class, ...$this->generateCacheKey()]));
789-
}
790764
}

0 commit comments

Comments
 (0)