Skip to content

Commit d119db7

Browse files
authored
Remove getCacheKey() and getCacheTag() from Schema (#315)
1 parent 38ebb14 commit d119db7

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
@@ -40,6 +40,7 @@
4040
- Chg #310: Remove usage of `hasLimit()` and `hasOffset()` methods of `DQLQueryBuilder` class (@Tigrov)
4141
- Enh #313: Refactor according changes in `db` package (@Tigrov)
4242
- New #311: Add `caseSensitive` option to like condition (@vjik)
43+
- Enh #315: Remove `getCacheKey()` and `getCacheTag()` methods from `Schema` class (@Tigrov)
4344

4445
## 1.3.0 March 21, 2024
4546

src/Schema.php

-26
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
use function array_reverse;
2727
use function implode;
2828
use function is_array;
29-
use function md5;
3029
use function preg_replace;
31-
use function serialize;
3230
use function strtolower;
3331

3432
/**
@@ -739,28 +737,4 @@ protected function findViewNames(string $schema = ''): array
739737

740738
return $views;
741739
}
742-
743-
/**
744-
* Returns the cache key for the specified table name.
745-
*
746-
* @param string $name The table name.
747-
*
748-
* @return array The cache key.
749-
*/
750-
protected function getCacheKey(string $name): array
751-
{
752-
return [self::class, ...$this->generateCacheKey(), $this->db->getQuoter()->getRawTableName($name)];
753-
}
754-
755-
/**
756-
* Returns the cache tag name.
757-
*
758-
* This allows {@see refresh()} to invalidate all cached table schemas.
759-
*
760-
* @return string The cache tag name.
761-
*/
762-
protected function getCacheTag(): string
763-
{
764-
return md5(serialize([self::class, ...$this->generateCacheKey()]));
765-
}
766740
}

0 commit comments

Comments
 (0)