Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Return value of Rinvex\Repository\Repositories\BaseRepository::getCacheDriver() must be of the type string, null returned #174

Open
dingshoukun opened this issue Mar 14, 2018 · 5 comments

Comments

@dingshoukun
Copy link

Return value of Rinvex\Repository\Repositories\BaseRepository::getCacheDriver() must be of the type
string, null returned 如何修复这个问题

@dingshoukun
Copy link
Author

当缓存启用的时候 每次使用完毕都会清空cacheDriver 所以使用repository的时候每次都需要实例化,否则就会出现让面的错误。

When the cache is enabled, the cacheDriver will be emptied each time it is used. Therefore, every time you use the repository, you need to instantiate. Otherwise, you will get an error.

@maherelgamil
Copy link
Contributor

+1

@xiatian
Copy link

xiatian commented Apr 9, 2018

can remove declare(strict_types=1)?

@xiatian
Copy link

xiatian commented Apr 9, 2018

class UserRepository extends EloquentRepository { protected $repositoryId = 'rinvex.repository.user'; protected $cacheDriver = 'redis'; }

done well.

@Developeraya
Copy link

Any updates about this issue?
when I disabled cache it works fine, but it's not the best solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants