Support the ongoing development of Laravel.io →
posted 10 years ago
Cache
Last updated 2 years ago.
0

bumpie!

Last updated 2 years ago.
0

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)
Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

LukieB1 lukieb1 Joined 20 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.