this code is not caching the items.
its getting into the condition but still hitting the database. what could be wrong?
the items are saved in redis. and I can access it
get laravel:stores_ar_19_36_80_93
My Controller looks like this.
class StoresController extends Controller
{
public function get(Request $request)
{
if (\Cache::has($key)) {
\Log::info('cache hit on stores');
return \Cache::get($key);
}
return Store::with('openingHours', 'currency', 'storeTags.tag')->find($areaStore);
}
}
UPDATE
I'm using the waavi translation package and apparently something is getting messed up with that. it's not a caching problem.