Support the ongoing development of Laravel.io →
posted 9 years ago
Cache
Last updated 1 year ago.
0

Any thought on this?

Last updated 1 year ago.
0

A couple things,

Are you using xdebug on this server? It will trigger that error sometimes. You can increase the number in the php.ini xdebug seciton with xdebug.max_nesting_level=#

The other thing is on the Cache:put('...

Cache::put('box_banner', $ret, 60);

If this is the actual code, your cache key (box_banner) is not unique so your overwriting the cache ever time the function runs. Also you have no check if cache exists then load in there so all your doing is saving a cache every time.

Putting the cache check/load/save in the _box_banner function should work for caching the data. Especially if each of result of the function is different.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shahroq shahroq Joined 14 Jun 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.