Welcome Guest, Not a member yet? Register   Sign In
small question Database CI 4 cached
#1

Hello, 
I'm looking to achieve even more speed in my project. I have a small question: does this method cache the request?
[Image: vttJN4f.png]

Thanks for answer.µ
Florian
Reply
#2

What do you mean "cache the request"?

It returns the cached DB data if available.

See 
https://codeigniter4.github.io/CodeIgnit...html#cache
https://codeigniter4.github.io/CodeIgnit...face::save
Reply
#3

(01-16-2024, 02:05 PM)kenjis Wrote: What do you mean "cache the request"?

It returns the cached DB data if available.

See 
https://codeigniter4.github.io/CodeIgnit...html#cache
https://codeigniter4.github.io/CodeIgnit...face::save


Hi thanks for documentation, i have currently use this, my question is
"Based on my code, do you find that it improves the performance of SQL queries and avoids reproducing them to gain efficiency?"
Reply
#4

If the query takes more time than getting the cache, yes. 
But don't guess it. Measure it.
See https://www.codeigniter.com/user_guide/t...hmark.html
Reply
#5

(This post was last modified: 01-19-2024, 02:45 PM by ALTITUDE_DEV.)

(01-17-2024, 09:29 PM)kenjis Wrote: If the query takes more time than getting the cache, yes. 
But don't guess it. Measure it.
See https://www.codeigniter.com/user_guide/t...hmark.html


Ok thanks for tool i dont have see this Wink

I have other question with LIKE mode :

My Model :

i send "Agences Web" found 1 entrie, my problem, i search now "Agence Web" found 0 entries, how to ignore faults or plurial/singular ? thanks for help.

public function getServices($service){
return $this->db->table('module_index_services')->select('serviceName')->like('serviceName', $service)->get()->getResult();
}
Reply




Theme © iAndrew 2016 - Forum software by © MyBB