This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
rumych9431
Hello. I want to use caching in component. connect - use Cache; but when prompted -if (Cache::has('list')) or Cache::add('list', $result, 10); an error - An exception has been thrown during the rendering of a template ("Serialization of 'Closure' is not allowed"). I tried so - use \Cache; \Cache::add('list', $result, 10); but does not work Thank you.
rumych9431
it turns out that, when I try to cache data from a table, function serialize() It gives this error. this does not work too. $result = Category::all(); Cache::remember('List', 10, function() use($result) { return $result; });
1-3 of 3