I think I'm confused on what the problem is and what its not doing.
If I create a key with dots,
Cache::put('some.dot.key', 'Grapes are not orange', 1);
Then get the key, it appears to work fine
$value = Cache::get('some.dot.key');
dd($value);
Result: string 'Grapes are not orange' (length=21)
When I create a session like this Session::put('foo.bar.test', 'lol') it creates an array like this:
array(
'foo' => array(
'bar' => array(
'test' => 'lol'
)
)
When I do the same with the Cache class: Cache::put('foo.bar.test', 'lol') it just puts 'lol' in a string called 'foo.bar.test' instead of making an array of it.. So when I want to call Cache::get('foo') it returns nothing while in the session class it would return me the array inside 'foo', that is what dot notation means.
I just re-coded the cache class in laravel, I can use the dot notations in caching as well now. If in the future someone wants to know how I did it, just message me.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community