Is it good to use $GLOBALS as cache for sql result. I am working on a project, and the code is not good enough. There are lots of repeated sql during one request. So, I wonder is there a way to use sql statement as key and cache query result.
Please sign in or create an account to participate in this conversation.
Reply to
Use Markdown with GitHub-flavored code blocks.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
Is it good to use $GLOBALS as cache?
Is it good to use $GLOBALS as cache for sql result. I am working on a project, and the code is not good enough. There are lots of repeated sql during one request. So, I wonder is there a way to use sql statement as key and cache query result.