Skip to content

Commit b5d5a6f

Browse files
author
Herbert Maschke
committed
Use the part of the query (->from) instead of the table name of the model (->table)
1 parent 363624d commit b5d5a6f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.10.3] - 2021-03-16
8+
### Changed
9+
- The from part of the query ($query->from) instead of the table name of the model ($model->table)
10+
is now used for determining the table part caching key fragment
11+
712
## [0.10.2] - 2020-09-04
813
### Added
914
- functionality to inject custom builder class for handling conflicting packages.

src/CacheKey.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function getLimitClause() : string
6969

7070
protected function getTableSlug() : string
7171
{
72-
return (new Str)->slug($this->model->getTable())
72+
return (new Str)->slug($this->query->from)
7373
. ":";
7474
}
7575

0 commit comments

Comments
 (0)