Skip to content

Use the part of the query (->from) instead of the table name of the model (->table) #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/CacheKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. ":";
}

Expand Down