diff --git a/CHANGELOG.md b/CHANGELOG.md index a379136..d1d4163 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.10.3] - 2021-03-16 +### Changed +- The from part of the query ($query->from) instead of the table name of the model ($model->table) + is now used for determining the table part caching key fragment + ## [0.10.2] - 2020-09-04 ### Added - functionality to inject custom builder class for handling conflicting packages. diff --git a/src/CacheKey.php b/src/CacheKey.php index c85aac3..c4b985f 100644 --- a/src/CacheKey.php +++ b/src/CacheKey.php @@ -69,7 +69,7 @@ protected function getLimitClause() : string protected function getTableSlug() : string { - return (new Str)->slug($this->model->getTable()) + return (new Str)->slug($this->query->from) . ":"; }