Closed fefo-p closed 3 years ago
A comment should be added to the README.md stating that to be able to use cache you'd have to set the driver in the .env file.
CACHE_DRIVER=file
If using the database driver, then change the .env
CACHE_DRIVER var to
CACHE_DRIVER=database
and migrate the DB
php artisan cache:table
php artisan migrate
Please update the readme within this PR, then I'll merge it.
Can I suggest to create 2 config's variables (prefix and suffix) instead of use this: 'user-'.Auth::id().'-preferences', so we can customize the key used by the cache. What do you think about it?
This has been updated and merged with the customisable config for cache key prefix/suffix as suggested by @theVannu
Release 2.1.0
Using cache avoids DB queries when nothing has changed. \ We flush the cache inside
save
method whenever a value has changed