Closed BenRutlandWeb closed 3 years ago
Is your feature request related to a problem? Please describe. Getting multiple values from the cache involves lots of copy pasta.
Describe the solution you'd like Methods to get/set multiple cache values Cache::many() etc.
Cache::many()
Describe alternatives you've considered Loops are a bit ugly.
Additional context Laravel has (poorly documented) multiple methods to handle many cache keys. many, putMany
many
putMany
The ability to add a prefix to cache keys would also be cool:
Cache::prefix('users')->putMany([ 'ben' => User::find(1), // users.ben 'jerry' => User::find(2), // users.jerry ]); $ben = Cache::get('users.ben'); $jerry = Cache::prefix('users')->get('jerry');
Reopened as the prefix idea wasn't implemented
To be consistent with Laravel, the cache prefix should be set in the config rather than when calling the class
Reopened until the config has been implemented.
Is your feature request related to a problem? Please describe. Getting multiple values from the cache involves lots of copy pasta.
Describe the solution you'd like Methods to get/set multiple cache values
Cache::many()
etc.Describe alternatives you've considered Loops are a bit ugly.
Additional context Laravel has (poorly documented) multiple methods to handle many cache keys.
many
,putMany
The ability to add a prefix to cache keys would also be cool: